From 937e8e1731684bbb2a0b411db3a75ae42a53ea35 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Apr 2026 23:07:34 +0000 Subject: [PATCH 1/2] feat: add principal field to BigQuery Reservation Assignment docs: update the scaling mode documentation to correct an example math error PiperOrigin-RevId: 899158032 Source-Link: https://github.com/googleapis/googleapis/commit/a5bd611f6a805c60fe69e1f656a0a870e7699ba7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2bef3dbc678dae5a81806a74b7cd65043600cbe0 Copy-Tag: eyJwIjoiQmlnUXVlcnlSZXNlcnZhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiMmJlZjNkYmM2NzhkYWU1YTgxODA2YTc0YjdjZDY1MDQzNjAwY2JlMCJ9 --- .../Bigquery/Reservation/V1/Reservation.php | 34 + .../BigQuery/Reservation/V1/Assignment.php | 385 +++ .../Reservation/V1/Assignment/JobType.php | 114 + .../Reservation/V1/Assignment/State.php | 64 + .../BigQuery/Reservation/V1/BiReservation.php | 187 ++ .../Reservation/V1/CapacityCommitment.php | 535 +++++ .../V1/CapacityCommitment/CommitmentPlan.php | 131 + .../V1/CapacityCommitment/State.php | 71 + .../V1/CreateAssignmentRequest.php | 181 ++ .../V1/CreateCapacityCommitmentRequest.php | 221 ++ .../V1/CreateReservationGroupRequest.php | 158 ++ .../V1/CreateReservationRequest.php | 179 ++ .../V1/DeleteAssignmentRequest.php | 89 + .../V1/DeleteCapacityCommitmentRequest.php | 129 + .../V1/DeleteReservationGroupRequest.php | 87 + .../V1/DeleteReservationRequest.php | 87 + .../Cloud/BigQuery/Reservation/V1/Edition.php | 70 + .../BigQuery/Reservation/V1/FailoverMode.php | 67 + .../V1/FailoverReservationRequest.php | 113 + .../V1/GetBiReservationRequest.php | 86 + .../V1/GetCapacityCommitmentRequest.php | 87 + .../V1/GetReservationGroupRequest.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/ListReservationGroupsRequest.php | 155 ++ .../V1/ListReservationGroupsResponse.php | 106 + .../V1/ListReservationsRequest.php | 155 ++ .../V1/ListReservationsResponse.php | 106 + .../V1/MergeCapacityCommitmentsRequest.php | 188 ++ .../Reservation/V1/MoveAssignmentRequest.php | 184 ++ .../BigQuery/Reservation/V1/Reservation.php | 1084 +++++++++ .../Reservation/V1/Reservation/Autoscale.php | 117 + .../V1/Reservation/ReplicationStatus.php | 245 ++ .../V1/Reservation/ScalingMode.php | 109 + .../Reservation/V1/ReservationGroup.php | 83 + .../Reservation/V1/SchedulingPolicy.php | 145 ++ .../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 + .../create_reservation_group.php | 81 + .../delete_assignment.php | 89 + .../delete_capacity_commitment.php | 76 + .../delete_reservation.php | 76 + .../delete_reservation_group.php | 76 + .../failover_reservation.php | 80 + .../get_bi_reservation.php | 72 + .../get_capacity_commitment.php | 76 + .../get_iam_policy.php | 85 + .../get_reservation.php | 76 + .../get_reservation_group.php | 76 + .../list_assignments.php | 106 + .../list_capacity_commitments.php | 77 + .../list_reservation_groups.php | 77 + .../list_reservations.php | 77 + .../merge_capacity_commitments.php | 63 + .../move_assignment.php | 82 + .../search_all_assignments.php | 97 + .../search_assignments.php | 100 + .../set_iam_policy.php | 82 + .../split_capacity_commitment.php | 83 + .../test_iam_permissions.php | 84 + .../update_assignment.php | 59 + .../update_bi_reservation.php | 64 + .../update_capacity_commitment.php | 63 + .../update_reservation.php | 57 + .../V1/Client/ReservationServiceClient.php | 1349 +++++++++++ .../v1/src/V1/gapic_metadata.json | 163 ++ .../reservation_service_client_config.json | 190 ++ .../reservation_service_descriptor_config.php | 436 ++++ ...reservation_service_rest_client_config.php | 389 +++ .../Client/ReservationServiceClientTest.php | 2133 +++++++++++++++++ 85 files changed, 14989 insertions(+) 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/CreateReservationGroupRequest.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/DeleteReservationGroupRequest.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/FailoverMode.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.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/GetReservationGroupRequest.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/ListReservationGroupsRequest.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.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/Reservation/ReplicationStatus.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.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/create_reservation_group.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/delete_reservation_group.php create mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_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_iam_policy.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/get_reservation_group.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_reservation_groups.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/set_iam_policy.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/test_iam_permissions.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 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 000000000000..6711458b8138 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\xDE\x83\x01\x0A6google/cloud/bigquery/reservation/v1/reservation.proto\x12\$google.cloud.bigquery.reservation.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFC\x0C\x0A\x0BReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dslot_capacity\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x1E\x0A\x11ignore_idle_slots\x18\x04 \x01(\x08B\x03\xE0A\x01\x12S\x0A\x09autoscale\x18\x07 \x01(\x0B2;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xE0A\x01\x12\x18\x0A\x0Bconcurrency\x18\x10 \x01(\x03B\x03\xE0A\x01\x126\x0A\x0Dcreation_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\"\x0A\x16multi_region_auxiliary\x18\x0E \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x11 \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12C\x0A\x10primary_location\x18\x12 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12E\x0A\x12secondary_location\x18\x13 \x01(\x09B)\xE0A\x01\xFAA#\x0A!locations.googleapis.com/Location\x12L\x0A\x19original_primary_location\x18\x14 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12\x1B\x0A\x09max_slots\x18\x15 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12X\x0A\x0Cscaling_mode\x18\x16 \x01(\x0E2=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xE0A\x01\x12R\x0A\x06labels\x18\x17 \x03(\x0B2=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xE0A\x01\x12\x1E\x0A\x11reservation_group\x18\x19 \x01(\x09B\x03\xE0A\x01\x12d\x0A\x12replication_status\x18\x18 \x01(\x0B2C.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xE0A\x03\x12V\x0A\x11scheduling_policy\x18\x1B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x1A?\x0A\x09Autoscale\x12\x1A\x0A\x0Dcurrent_slots\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x16\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01\x1A\xF8\x01\x0A\x11ReplicationStatus\x12&\x0A\x05error\x18\x01 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x128\x0A\x0Flast_error_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x15last_replication_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x18soft_failover_start_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"c\x0A\x0BScalingMode\x12\x1C\x0A\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EAUTOSCALE_ONLY\x10\x01\x12\x13\x0A\x0FIDLE_SLOTS_ONLY\x10\x02\x12\x0D\x0A\x09ALL_SLOTS\x10\x03:w\xEAAt\x0A.bigqueryreservation.googleapis.com/Reservation\x12Bprojects/{project}/locations/{location}/reservations/{reservation}B\x0C\x0A\x0A_max_slots\"l\x0A\x10SchedulingPolicy\x12\x1D\x0A\x0Bconcurrency\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1B\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x0E\x0A\x0C_concurrencyB\x0C\x0A\x0A_max_slots\"\xD5\x01\x0A\x10ReservationGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:\xAD\x01\xEAA\xA9\x01\x0A3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xAA\x08\x0A\x12CapacityCommitment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Aslot_count\x18\x02 \x01(\x03B\x03\xE0A\x01\x12Z\x0A\x04plan\x18\x03 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12R\x0A\x05state\x18\x04 \x01(\x0E2>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xE0A\x03\x12>\x0A\x15commitment_start_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x13commitment_end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x0Efailure_status\x18\x07 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x12b\x0A\x0Crenewal_plan\x18\x08 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12\"\x0A\x16multi_region_auxiliary\x18\x0A \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x0C \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12\x19\x0A\x0Cis_flat_rate\x18\x0E \x01(\x08B\x03\xE0A\x03\"\xCA\x01\x0A\x0ECommitmentPlan\x12\x1F\x0A\x1BCOMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\x0A\x04FLEX\x10\x03\x12\x16\x0A\x0EFLEX_FLAT_RATE\x10\x07\x1A\x02\x08\x01\x12\x0D\x0A\x05TRIAL\x10\x05\x1A\x02\x08\x01\x12\x0B\x0A\x07MONTHLY\x10\x02\x12\x19\x0A\x11MONTHLY_FLAT_RATE\x10\x08\x1A\x02\x08\x01\x12\x0A\x0A\x06ANNUAL\x10\x04\x12\x18\x0A\x10ANNUAL_FLAT_RATE\x10\x09\x1A\x02\x08\x01\x12\x0E\x0A\x0ATHREE_YEAR\x10\x0A\x12\x08\x0A\x04NONE\x10\x06\"C\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03:\x8E\x01\xEAA\x8A\x01\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xC2\x01\x0A\x18CreateReservationRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\x0A\x0Ereservation_id\x18\x02 \x01(\x09\x12F\x0A\x0Breservation\x18\x03 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\x0A\x17ListReservationsRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"|\x0A\x18ListReservationsResponse\x12G\x0A\x0Creservations\x18\x01 \x03(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"]\x0A\x15GetReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"`\x0A\x18DeleteReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\x0A\x18UpdateReservationRequest\x12F\x0A\x0Breservation\x18\x01 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xB2\x01\x0A\x1AFailoverReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\x12N\x0A\x0Dfailover_mode\x18\x02 \x01(\x0E22.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xE0A\x01\"\xE7\x01\x0A\x1DCreateReservationGroupRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12!\x0A\x14reservation_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12V\x0A\x11reservation_group\x18\x03 \x01(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xE0A\x02\"g\x0A\x1AGetReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\x0A\x1CListReservationGroupsRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x8C\x01\x0A\x1DListReservationGroupsResponse\x12R\x0A\x12reservation_groups\x18\x01 \x03(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"j\x0A\x1DDeleteReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\x0A\x1FCreateCapacityCommitmentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12U\x0A\x13capacity_commitment\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\x0A\$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1E\x0A\x16capacity_commitment_id\x18\x05 \x01(\x09\"\x96\x01\x0A\x1EListCapacityCommitmentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A\x1FListCapacityCommitmentsResponse\x12V\x0A\x14capacity_commitments\x18\x01 \x03(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"k\x0A\x1CGetCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\"}\x0A\x1FDeleteCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x0D\x0A\x05force\x18\x03 \x01(\x08\"\xA9\x01\x0A\x1FUpdateCapacityCommitmentRequest\x12U\x0A\x13capacity_commitment\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x81\x01\x0A\x1ESplitCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\x0A\x0Aslot_count\x18\x02 \x01(\x03\"\xB4\x01\x0A\x1FSplitCapacityCommitmentResponse\x12G\x0A\x05first\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\x0A\x06second\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xB3\x01\x0A\x1FMergeCapacityCommitmentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x1F\x0A\x17capacity_commitment_ids\x18\x02 \x03(\x09\x12#\x0A\x16capacity_commitment_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xB1\x06\x0A\x0AAssignment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08assignee\x18\x04 \x01(\x09B\x03\xE0A\x01\x12O\x0A\x08job_type\x18\x03 \x01(\x0E28.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xE0A\x01\x12J\x0A\x05state\x18\x06 \x01(\x0E26.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xE0A\x03\x12(\x0A\x19enable_gemini_in_bigquery\x18\x0A \x01(\x08B\x05\x18\x01\xE0A\x01\x12V\x0A\x11scheduling_policy\x18\x0B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x12\x16\x0A\x09principal\x18\x0C \x01(\x09B\x03\xE0A\x01\"\xDC\x01\x0A\x07JobType\x12\x18\x0A\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08PIPELINE\x10\x01\x12\x09\x0A\x05QUERY\x10\x02\x12\x0F\x0A\x0BML_EXTERNAL\x10\x03\x12\x0E\x0A\x0ABACKGROUND\x10\x04\x12\x0E\x0A\x0ACONTINUOUS\x10\x06\x12\"\x0A\x1EBACKGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12\$\x0A BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\x0A\x1FBACKGROUND_SEARCH_INDEX_REFRESH\x10\x09\"7\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02:\xA9\x01\xEAA\xA5\x01\x0A-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0Bassignments2\x0Aassignment\"\xBD\x01\x0A\x17CreateAssignmentRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12D\x0A\x0Aassignment\x18\x02 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\x0A\x0Dassignment_id\x18\x04 \x01(\x09\"\x86\x01\x0A\x16ListAssignmentsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x17ListAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"^\x0A\x17DeleteAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\"\x8B\x01\x0A\x18SearchAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"\x8E\x01\x0A\x1BSearchAllAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"{\x0A\x19SearchAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"~\x0A\x1CSearchAllAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBF\x01\x0A\x15MoveAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\x12J\x0A\x0Edestination_id\x18\x03 \x01(\x09B2\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\x0A\x0Dassignment_id\x18\x05 \x01(\x09\"\x90\x01\x0A\x17UpdateAssignmentRequest\x12D\x0A\x0Aassignment\x18\x01 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"Y\x0A\x0ETableReference\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Adataset_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08table_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xAE\x02\x0A\x0DBiReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x04 \x01(\x03B\x03\xE0A\x01\x12S\x0A\x10preferred_tables\x18\x05 \x03(\x0B24.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xE0A\x01:l\xEAAi\x0A0bigqueryreservation.googleapis.com/BiReservation\x125projects/{project}/locations/{location}/biReservation\"a\x0A\x17GetBiReservationRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0bigqueryreservation.googleapis.com/BiReservation\"\x9A\x01\x0A\x1AUpdateBiReservationRequest\x12K\x0A\x0Ebi_reservation\x18\x01 \x01(\x0B23.google.cloud.bigquery.reservation.v1.BiReservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask*U\x0A\x07Edition\x12\x17\x0A\x13EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\x12\x13\x0A\x0FENTERPRISE_PLUS\x10\x03*A\x0A\x0CFailoverMode\x12\x1D\x0A\x19FAILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SOFT\x10\x01\x12\x08\x0A\x04HARD\x10\x022\xA36\x0A\x12ReservationService\x12\xF1\x01\x0A\x11CreateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"i\xDAA!parent,reservation,reservation_id\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0Breservation\x12\xD4\x01\x0A\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1A>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/reservations\x12\xC1\x01\x0A\x0EGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/reservations/*}\x12\xAC\x01\x0A\x11DeleteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xF3\x01\x0A\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"k\xDAA\x17reservation,update_mask\x82\xD3\xE4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\x0Aassignment\x12\xDF\x01\x0A\x0FListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1A=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xB8\x01\x0A\x10DeleteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xE5\x01\x0A\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1A?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xEE\x01\x0A\x14SearchAllAssignments\x12A.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1AB.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xE5\x01\x0A\x0EMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"d\xDAA\x13name,destination_id\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xFB\x01\x0A\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"v\xDAA\x16assignment,update_mask\x82\xD3\xE4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\x0Aassignment\x12\xC6\x01\x0A\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\x0A\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\"s\xDAA\x1Abi_reservation,update_mask\x82\xD3\xE4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0Ebi_reservation\x12\xF4\x01\x0A\x0CGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xA8\x01\xDAA\x08resource\x82\xD3\xE4\x93\x02\x96\x01\x12A/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\x0A\x0CSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xB5\x01\xDAA\x0Fresource,policy\x82\xD3\xE4\x93\x02\x9C\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9B\x02\x0A\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"\xAF\x01\x82\xD3\xE4\x93\x02\xA8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xE7\x01\x0A\x16CreateReservationGroup\x12C.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xD5\x01\x0A\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xBB\x01\x0A\x16DeleteReservationGroup\x12C.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xE8\x01\x0A\x15ListReservationGroups\x12B.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1AC.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/reservationGroups\x1A\x7F\xCAA\"bigqueryreservation.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xD8\x01\x0A(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xAA\x02\$Google.Cloud.BigQuery.Reservation.V1\xCA\x02\$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + 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..b624222eb5e7 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php @@ -0,0 +1,385 @@ +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 = ''; + /** + * Optional. The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $assignee = ''; + /** + * Optional. Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + /** + * Optional. Deprecated: "Gemini in BigQuery" is now available by + * default for all BigQuery editions and should not be explicitly set. + * Controls if "Gemini in BigQuery" + * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + * enabled for this reservation assignment. + * + * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $enable_gemini_in_bigquery = false; + /** + * Optional. The scheduling policy to use for jobs and queries of this + * assignee when running under the associated reservation. The scheduling + * policy controls how the reservation's resources are distributed. This + * overrides the default scheduling policy specified on the reservation. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduling_policy = null; + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $principal = ''; + + /** + * 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 + * Optional. The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * @type int $job_type + * Optional. Which type of jobs will use the reservation. + * @type int $state + * Output only. State of the assignment. + * @type bool $enable_gemini_in_bigquery + * Optional. Deprecated: "Gemini in BigQuery" is now available by + * default for all BigQuery editions and should not be explicitly set. + * Controls if "Gemini in BigQuery" + * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + * enabled for this reservation assignment. + * @type \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $scheduling_policy + * Optional. The scheduling policy to use for jobs and queries of this + * assignee when running under the associated reservation. The scheduling + * policy controls how the reservation's resources are distributed. This + * overrides the default scheduling policy specified on the reservation. + * This feature is not yet generally available. + * @type string $principal + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * } + */ + 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; + } + + /** + * Optional. The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAssignee() + { + return $this->assignee; + } + + /** + * Optional. The resource which will use the reservation. E.g. + * `projects/myproject`, `folders/123`, or `organizations/456`. + * + * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAssignee($var) + { + GPBUtil::checkString($var, True); + $this->assignee = $var; + + return $this; + } + + /** + * Optional. Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getJobType() + { + return $this->job_type; + } + + /** + * Optional. Which type of jobs will use the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Deprecated: "Gemini in BigQuery" is now available by + * default for all BigQuery editions and should not be explicitly set. + * Controls if "Gemini in BigQuery" + * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + * enabled for this reservation assignment. + * + * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + * @deprecated + */ + public function getEnableGeminiInBigquery() + { + if ($this->enable_gemini_in_bigquery !== false) { + @trigger_error('enable_gemini_in_bigquery is deprecated.', E_USER_DEPRECATED); + } + return $this->enable_gemini_in_bigquery; + } + + /** + * Optional. Deprecated: "Gemini in BigQuery" is now available by + * default for all BigQuery editions and should not be explicitly set. + * Controls if "Gemini in BigQuery" + * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + * enabled for this reservation assignment. + * + * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setEnableGeminiInBigquery($var) + { + @trigger_error('enable_gemini_in_bigquery is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->enable_gemini_in_bigquery = $var; + + return $this; + } + + /** + * Optional. The scheduling policy to use for jobs and queries of this + * assignee when running under the associated reservation. The scheduling + * policy controls how the reservation's resources are distributed. This + * overrides the default scheduling policy specified on the reservation. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy|null + */ + public function getSchedulingPolicy() + { + return $this->scheduling_policy; + } + + public function hasSchedulingPolicy() + { + return isset($this->scheduling_policy); + } + + public function clearSchedulingPolicy() + { + unset($this->scheduling_policy); + } + + /** + * Optional. The scheduling policy to use for jobs and queries of this + * assignee when running under the associated reservation. The scheduling + * policy controls how the reservation's resources are distributed. This + * overrides the default scheduling policy specified on the reservation. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $var + * @return $this + */ + public function setSchedulingPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy::class); + $this->scheduling_policy = $var; + + return $this; + } + + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrincipal() + { + return $this->principal; + } + + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkString($var, True); + $this->principal = $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..8ffad48780b6 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php @@ -0,0 +1,114 @@ +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; + /** + * Continuous SQL jobs will use this reservation. Reservations with + * continuous assignments cannot be mixed with non-continuous assignments. + * + * Generated from protobuf enum CONTINUOUS = 6; + */ + const CONTINUOUS = 6; + /** + * Finer granularity background jobs for capturing changes in a source + * database and streaming them into BigQuery. Reservations with this job + * type take priority over a default BACKGROUND reservation assignment (if + * it exists). + * + * Generated from protobuf enum BACKGROUND_CHANGE_DATA_CAPTURE = 7; + */ + const BACKGROUND_CHANGE_DATA_CAPTURE = 7; + /** + * Finer granularity background jobs for refreshing cached metadata for + * BigQuery tables. Reservations with this job type take priority over a + * default BACKGROUND reservation assignment (if it exists). + * + * Generated from protobuf enum BACKGROUND_COLUMN_METADATA_INDEX = 8; + */ + const BACKGROUND_COLUMN_METADATA_INDEX = 8; + /** + * Finer granularity background jobs for refreshing search indexes upon + * BigQuery table columns. Reservations with this job type + * take priority over a default BACKGROUND reservation assignment (if it + * exists). + * + * Generated from protobuf enum BACKGROUND_SEARCH_INDEX_REFRESH = 9; + */ + const BACKGROUND_SEARCH_INDEX_REFRESH = 9; + + private static $valueToName = [ + self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', + self::PIPELINE => 'PIPELINE', + self::QUERY => 'QUERY', + self::ML_EXTERNAL => 'ML_EXTERNAL', + self::BACKGROUND => 'BACKGROUND', + self::CONTINUOUS => 'CONTINUOUS', + self::BACKGROUND_CHANGE_DATA_CAPTURE => 'BACKGROUND_CHANGE_DATA_CAPTURE', + self::BACKGROUND_COLUMN_METADATA_INDEX => 'BACKGROUND_COLUMN_METADATA_INDEX', + self::BACKGROUND_SEARCH_INDEX_REFRESH => 'BACKGROUND_SEARCH_INDEX_REFRESH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/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..3c09d6d11139 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php @@ -0,0 +1,64 @@ +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); + } +} + 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..cfc2b5269b1d --- /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 +{ + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + */ + 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; + /** + * Optional. Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $size = 0; + /** + * Optional. Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $preferred_tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. 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 + * Optional. Size of a reservation, in bytes. + * @type \Google\Cloud\BigQuery\Reservation\V1\TableReference[] $preferred_tables + * Optional. Preferred tables to use BI capacity for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The 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; + } + + /** + * Optional. Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getSize() + { + return $this->size; + } + + /** + * Optional. Size of a reservation, in bytes. + * + * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkInt64($var); + $this->size = $var; + + return $this; + } + + /** + * Optional. Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\TableReference> + */ + public function getPreferredTables() + { + return $this->preferred_tables; + } + + /** + * Optional. Preferred tables to use BI capacity for. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Reservation\V1\TableReference[] $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..424d552bf299 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php @@ -0,0 +1,535 @@ +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 = ''; + /** + * Optional. Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slot_count = 0; + /** + * Optional. Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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. Note after the commitment is renewed, + * commitment_start_time won't be changed. It refers to the start time of the + * original commitment. + * + * 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. Note after renewal, + * commitment_end_time is the time the renewed commitment expires. So itwould + * be at a time after commitment_start_time + committed period, because we + * don't change commitment_start_time , + * + * 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; + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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 [deprecated = true]; + * @deprecated + */ + protected $multi_region_auxiliary = false; + /** + * Optional. Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition = 0; + /** + * Output only. If true, the commitment is a flat-rate commitment, otherwise, + * it's an edition commitment. + * + * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_flat_rate = false; + + /** + * 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 + * Optional. Number of slots in this commitment. + * @type int $plan + * Optional. 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. Note after the commitment is renewed, + * commitment_start_time won't be changed. It refers to the start time of the + * original commitment. + * @type \Google\Protobuf\Timestamp $commitment_end_time + * Output only. The end of the current commitment period. It is applicable + * only for ACTIVE capacity commitments. Note after renewal, + * commitment_end_time is the time the renewed commitment expires. So itwould + * be at a time after commitment_start_time + committed period, because we + * don't change commitment_start_time , + * @type \Google\Rpc\Status $failure_status + * Output only. For FAILED commitment plan, provides the reason of failure. + * @type int $renewal_plan + * Optional. 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 + * Optional. Edition of the capacity commitment. + * @type bool $is_flat_rate + * Output only. If true, the commitment is a flat-rate commitment, otherwise, + * it's an edition 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; + } + + /** + * Optional. Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getSlotCount() + { + return $this->slot_count; + } + + /** + * Optional. Number of slots in this commitment. + * + * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setSlotCount($var) + { + GPBUtil::checkInt64($var); + $this->slot_count = $var; + + return $this; + } + + /** + * Optional. Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPlan() + { + return $this->plan; + } + + /** + * Optional. Capacity commitment commitment plan. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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. Note after the commitment is renewed, + * commitment_start_time won't be changed. It refers to the start time of the + * original commitment. + * + * 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. Note after the commitment is renewed, + * commitment_start_time won't be changed. It refers to the start time of the + * original commitment. + * + * 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. Note after renewal, + * commitment_end_time is the time the renewed commitment expires. So itwould + * be at a time after commitment_start_time + committed period, because we + * don't change commitment_start_time , + * + * 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. Note after renewal, + * commitment_end_time is the time the renewed commitment expires. So itwould + * be at a time after commitment_start_time + committed period, because we + * don't change commitment_start_time , + * + * 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; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRenewalPlan() + { + return $this->renewal_plan; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @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 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getMultiRegionAuxiliary() + { + if ($this->multi_region_auxiliary !== false) { + @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); + } + 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 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setMultiRegionAuxiliary($var) + { + @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->multi_region_auxiliary = $var; + + return $this; + } + + /** + * Optional. Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Optional. Edition of the capacity commitment. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); + $this->edition = $var; + + return $this; + } + + /** + * Output only. If true, the commitment is a flat-rate commitment, otherwise, + * it's an edition commitment. + * + * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsFlatRate() + { + return $this->is_flat_rate; + } + + /** + * Output only. If true, the commitment is a flat-rate commitment, otherwise, + * it's an edition commitment. + * + * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsFlatRate($var) + { + GPBUtil::checkBool($var); + $this->is_flat_rate = $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..1ab5419487d7 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php @@ -0,0 +1,131 @@ +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 [deprecated = true]; + */ + 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); + } +} + 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..7292ff08a50a --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php @@ -0,0 +1,71 @@ +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); + } +} + 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..52082ac349e1 --- /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..aec09e340bc0 --- /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/CreateReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationGroupRequest.php new file mode 100644 index 000000000000..ed6c26e5f132 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationGroupRequest.php @@ -0,0 +1,158 @@ +google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest + */ +class CreateReservationGroupRequest 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 = ''; + /** + * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reservation_group_id = ''; + /** + * Required. New Reservation Group to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reservation_group = null; + + /** + * 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_group_id + * Required. The reservation group 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\ReservationGroup $reservation_group + * Required. New Reservation Group 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; + } + + /** + * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReservationGroupId() + { + return $this->reservation_group_id; + } + + /** + * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReservationGroupId($var) + { + GPBUtil::checkString($var, True); + $this->reservation_group_id = $var; + + return $this; + } + + /** + * Required. New Reservation Group to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup|null + */ + public function getReservationGroup() + { + return $this->reservation_group; + } + + public function hasReservationGroup() + { + return isset($this->reservation_group); + } + + public function clearReservationGroup() + { + unset($this->reservation_group); + } + + /** + * Required. New Reservation Group to create. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup $var + * @return $this + */ + public function setReservationGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup::class); + $this->reservation_group = $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..454b5b6fc28c --- /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..26e2a7ef80f7 --- /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..fac3cc1e58eb --- /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/DeleteReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationGroupRequest.php new file mode 100644 index 000000000000..0f9365d1bc12 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationGroupRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest + */ +class DeleteReservationGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the reservation group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/team1-prod` + * Please see {@see ReservationServiceClient::reservationGroupName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteReservationGroupRequest + * + * @experimental + */ + public static function 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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/team1-prod` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the reservation group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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/DeleteReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php new file mode 100644 index 000000000000..579afd9bc271 --- /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..aeb6f5a1d84e --- /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/FailoverMode.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverMode.php new file mode 100644 index 000000000000..21659c71dda1 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverMode.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.reservation.v1.FailoverMode + */ +class FailoverMode +{ + /** + * Invalid value. + * + * Generated from protobuf enum FAILOVER_MODE_UNSPECIFIED = 0; + */ + const FAILOVER_MODE_UNSPECIFIED = 0; + /** + * When customers initiate a soft failover, BigQuery will wait until all + * committed writes are replicated to the secondary. This mode requires both + * regions to be available for the failover to succeed and prevents data loss. + * + * Generated from protobuf enum SOFT = 1; + */ + const SOFT = 1; + /** + * When customers initiate a hard failover, BigQuery will not wait until all + * committed writes are replicated to the secondary. There can be data loss + * for hard failover. + * + * Generated from protobuf enum HARD = 2; + */ + const HARD = 2; + + private static $valueToName = [ + self::FAILOVER_MODE_UNSPECIFIED => 'FAILOVER_MODE_UNSPECIFIED', + self::SOFT => 'SOFT', + self::HARD => 'HARD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/FailoverReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.php new file mode 100644 index 000000000000..541249d1eeab --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.php @@ -0,0 +1,113 @@ +google.cloud.bigquery.reservation.v1.FailoverReservationRequest + */ +class FailoverReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the reservation to failover. 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 = ''; + /** + * Optional. A parameter that determines how writes that are pending + * replication are handled after a failover is initiated. If not specified, + * HARD failover mode is used by default. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $failover_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the reservation to failover. E.g., + * `projects/myproject/locations/US/reservations/team1-prod` + * @type int $failover_mode + * Optional. A parameter that determines how writes that are pending + * replication are handled after a failover is initiated. If not specified, + * HARD failover mode is used by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the reservation to failover. 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 failover. 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; + } + + /** + * Optional. A parameter that determines how writes that are pending + * replication are handled after a failover is initiated. If not specified, + * HARD failover mode is used by default. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFailoverMode() + { + return $this->failover_mode; + } + + /** + * Optional. A parameter that determines how writes that are pending + * replication are handled after a failover is initiated. If not specified, + * HARD failover mode is used by default. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFailoverMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\FailoverMode::class); + $this->failover_mode = $var; + + return $this; + } + +} + 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..55f4d6c87f4d --- /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..9417442a84fe --- /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/GetReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationGroupRequest.php new file mode 100644 index 000000000000..81dbd2098580 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationGroupRequest.php @@ -0,0 +1,87 @@ +google.cloud.bigquery.reservation.v1.GetReservationGroupRequest + */ +class GetReservationGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the reservation group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/team1-prod` + * Please see {@see ReservationServiceClient::reservationGroupName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Reservation\V1\GetReservationGroupRequest + * + * @experimental + */ + public static function 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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/team1-prod` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the reservation group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., + * `projects/myproject/locations/US/reservationGroups/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/GetReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php new file mode 100644 index 000000000000..ccf51f8d429a --- /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..071ac53ab516 --- /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..fa098ef78425 --- /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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> + */ + 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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..df66845c159f --- /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..e6a36ff0f7ac --- /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 \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment> + */ + 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 \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment[] $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/ListReservationGroupsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsRequest.php new file mode 100644 index 000000000000..7021d28e43d5 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsRequest.php @@ -0,0 +1,155 @@ +google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest + */ +class ListReservationGroupsRequest 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\ListReservationGroupsRequest + * + * @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/ListReservationGroupsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.php new file mode 100644 index 000000000000..ef647a78dd9b --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.php @@ -0,0 +1,106 @@ +google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse + */ +class ListReservationGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of reservations visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_groups = 1; + */ + private $reservation_groups; + /** + * 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 \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup[] $reservation_groups + * 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.ReservationGroup reservation_groups = 1; + * @return RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\ReservationGroup> + */ + public function getReservationGroups() + { + return $this->reservation_groups; + } + + /** + * List of reservations visible to the user. + * + * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_groups = 1; + * @param \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup[] $var + * @return $this + */ + public function setReservationGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup::class); + $this->reservation_groups = $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..aac5c31b3e19 --- /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..07341619c430 --- /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 \Google\Cloud\BigQuery\Reservation\V1\Reservation[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Reservation> + */ + 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 \Google\Cloud\BigQuery\Reservation\V1\Reservation[] $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..a76cf6670f10 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php @@ -0,0 +1,188 @@ +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; + /** + * Optional. The optional resulting 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. + * + * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $capacity_commitment_id = ''; + + /** + * @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 string[] $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 + * @type string $capacity_commitment_id + * Optional. The optional resulting 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. + * } + */ + 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 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 string[] $var + * @return $this + */ + public function setCapacityCommitmentIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->capacity_commitment_ids = $arr; + + return $this; + } + + /** + * Optional. The optional resulting 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. + * + * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCapacityCommitmentId() + { + return $this->capacity_commitment_id; + } + + /** + * Optional. The optional resulting 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. + * + * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/MoveAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php new file mode 100644 index 000000000000..370f5b95e94f --- /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..44716e51738c --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php @@ -0,0 +1,1084 @@ +google.cloud.bigquery.reservation.v1.Reservation + */ +class Reservation extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Baseline 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, or autoscaling is enabled. + * The total slot_capacity of the reservation and its siblings + * may exceed the total slot_count of capacity commitments. In that case, the + * exceeding slots will be charged with the autoscale SKU. You can increase + * the number of baseline slots in a reservation every few minutes. If you + * want to decrease your baseline slots, you are limited to once an hour if + * you have recently changed your baseline slot capacity and your baseline + * slots exceed your committed slots. Otherwise, you can decrease your + * baseline slots every few minutes. + * + * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slot_capacity = 0; + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_idle_slots = false; + /** + * Optional. The configuration parameters for the auto scaling feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $autoscale = null; + /** + * Optional. 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 BigQuery CLI. + * + * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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 [deprecated = true]; + * @deprecated + */ + protected $multi_region_auxiliary = false; + /** + * Optional. Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition = 0; + /** + * Output only. The current location of the reservation's primary replica. + * This field is only set for reservations using the managed disaster recovery + * feature. + * + * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $primary_location = ''; + /** + * Optional. The current location of the reservation's secondary replica. This + * field is only set for reservations using the managed disaster recovery + * feature. Users can set this in create reservation calls + * to create a failover reservation or in update reservation calls to convert + * a non-failover reservation to a failover reservation(or vice versa). + * + * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $secondary_location = ''; + /** + * Output only. The location where the reservation was originally created. + * This is set only during the failover reservation's creation. All billing + * charges for the failover reservation will be applied to this location. + * + * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $original_primary_location = ''; + /** + * Optional. The overall max slots for the reservation, covering slot_capacity + * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + * If present, the reservation won't use more than the specified number of + * slots, even if there is demand and supply (from idle slots). + * NOTE: capping a reservation's idle slot usage is best effort and its + * usage may exceed the max_slots value. However, in terms of + * autoscale.current_slots (which accounts for the additional added slots), it + * will never exceed the max_slots - baseline. + * This field must be set together with the scaling_mode enum value, + * otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * If the max_slots and scaling_mode are set, the autoscale or + * autoscale.max_slots field must be unset. Otherwise the request will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + * autoscale field may still be in the output. The autopscale.max_slots will + * always show as 0 and the autoscaler.current_slots will represent the + * current slots from autoscaler excluding idle slots. + * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + * then in the output, the autoscaler.max_slots will be 0 and the + * autoscaler.current_slots may be any value between 0 and 1000. + * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + * and idle slots usage is 200, then in the output, the autoscaler.max_slots + * will be 0 and the autoscaler.current_slots will not be higher than 700. + * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + * output, the autoscaler field will be null. + * If the max_slots and scaling_mode are set, then the ignore_idle_slots field + * must be aligned with the scaling_mode enum value.(See details in + * ScalingMode comments). Otherwise the request will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note, the max_slots is for user to manage the part of slots greater + * than the baseline. Therefore, we don't allow users to set max_slots smaller + * or equal to the baseline as it will not be meaningful. If the field is + * present and slot_capacity>=max_slots, requests will be rejected with error + * code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note that if max_slots is set to 0, we will treat it as unset. + * Customers can set max_slots to 0 and set scaling_mode to + * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + * + * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_slots = null; + /** + * Optional. The scaling mode for the reservation. + * If the field is present but max_slots is not present, requests will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scaling_mode = 0; + /** + * Optional. The labels associated with this reservation. You can use these + * to organize and group your reservations. + * You can set this property when you create or update a reservation. + * + * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The reservation group that this reservation belongs to. + * You can set this property when you create or update a reservation. + * Reservations do not need to belong to a reservation group. + * Format: + * projects/{project}/locations/{location}/reservationGroups/{reservation_group} + * or just {reservation_group} + * + * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reservation_group = ''; + /** + * Output only. The Disaster Recovery(DR) replication status of the + * reservation. This is only available for the primary replicas of DR/failover + * reservations and provides information about the both the staleness of the + * secondary and the last error encountered while trying to replicate changes + * from the primary to the secondary. If this field is blank, it means that + * the reservation is either not a DR reservation or the reservation is a DR + * secondary or that any replication operations on the reservation have + * succeeded. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $replication_status = null; + /** + * Optional. The scheduling policy to use for jobs and queries running under + * this reservation. The scheduling policy controls how the reservation's + * resources are distributed. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduling_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. 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 + * Optional. Baseline 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, or autoscaling is enabled. + * The total slot_capacity of the reservation and its siblings + * may exceed the total slot_count of capacity commitments. In that case, the + * exceeding slots will be charged with the autoscale SKU. You can increase + * the number of baseline slots in a reservation every few minutes. If you + * want to decrease your baseline slots, you are limited to once an hour if + * you have recently changed your baseline slot capacity and your baseline + * slots exceed your committed slots. Otherwise, you can decrease your + * baseline slots every few minutes. + * @type bool $ignore_idle_slots + * Optional. 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 + * Optional. The configuration parameters for the auto scaling feature. + * @type int|string $concurrency + * Optional. 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 BigQuery 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 + * Optional. Edition of the reservation. + * @type string $primary_location + * Output only. The current location of the reservation's primary replica. + * This field is only set for reservations using the managed disaster recovery + * feature. + * @type string $secondary_location + * Optional. The current location of the reservation's secondary replica. This + * field is only set for reservations using the managed disaster recovery + * feature. Users can set this in create reservation calls + * to create a failover reservation or in update reservation calls to convert + * a non-failover reservation to a failover reservation(or vice versa). + * @type string $original_primary_location + * Output only. The location where the reservation was originally created. + * This is set only during the failover reservation's creation. All billing + * charges for the failover reservation will be applied to this location. + * @type int|string $max_slots + * Optional. The overall max slots for the reservation, covering slot_capacity + * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + * If present, the reservation won't use more than the specified number of + * slots, even if there is demand and supply (from idle slots). + * NOTE: capping a reservation's idle slot usage is best effort and its + * usage may exceed the max_slots value. However, in terms of + * autoscale.current_slots (which accounts for the additional added slots), it + * will never exceed the max_slots - baseline. + * This field must be set together with the scaling_mode enum value, + * otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * If the max_slots and scaling_mode are set, the autoscale or + * autoscale.max_slots field must be unset. Otherwise the request will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + * autoscale field may still be in the output. The autopscale.max_slots will + * always show as 0 and the autoscaler.current_slots will represent the + * current slots from autoscaler excluding idle slots. + * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + * then in the output, the autoscaler.max_slots will be 0 and the + * autoscaler.current_slots may be any value between 0 and 1000. + * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + * and idle slots usage is 200, then in the output, the autoscaler.max_slots + * will be 0 and the autoscaler.current_slots will not be higher than 700. + * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + * output, the autoscaler field will be null. + * If the max_slots and scaling_mode are set, then the ignore_idle_slots field + * must be aligned with the scaling_mode enum value.(See details in + * ScalingMode comments). Otherwise the request will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note, the max_slots is for user to manage the part of slots greater + * than the baseline. Therefore, we don't allow users to set max_slots smaller + * or equal to the baseline as it will not be meaningful. If the field is + * present and slot_capacity>=max_slots, requests will be rejected with error + * code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note that if max_slots is set to 0, we will treat it as unset. + * Customers can set max_slots to 0 and set scaling_mode to + * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + * @type int $scaling_mode + * Optional. The scaling mode for the reservation. + * If the field is present but max_slots is not present, requests will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels associated with this reservation. You can use these + * to organize and group your reservations. + * You can set this property when you create or update a reservation. + * @type string $reservation_group + * Optional. The reservation group that this reservation belongs to. + * You can set this property when you create or update a reservation. + * Reservations do not need to belong to a reservation group. + * Format: + * projects/{project}/locations/{location}/reservationGroups/{reservation_group} + * or just {reservation_group} + * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus $replication_status + * Output only. The Disaster Recovery(DR) replication status of the + * reservation. This is only available for the primary replicas of DR/failover + * reservations and provides information about the both the staleness of the + * secondary and the last error encountered while trying to replicate changes + * from the primary to the secondary. If this field is blank, it means that + * the reservation is either not a DR reservation or the reservation is a DR + * secondary or that any replication operations on the reservation have + * succeeded. + * @type \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $scheduling_policy + * Optional. The scheduling policy to use for jobs and queries running under + * this reservation. The scheduling policy controls how the reservation's + * resources are distributed. + * This feature is not yet generally available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Baseline 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, or autoscaling is enabled. + * The total slot_capacity of the reservation and its siblings + * may exceed the total slot_count of capacity commitments. In that case, the + * exceeding slots will be charged with the autoscale SKU. You can increase + * the number of baseline slots in a reservation every few minutes. If you + * want to decrease your baseline slots, you are limited to once an hour if + * you have recently changed your baseline slot capacity and your baseline + * slots exceed your committed slots. Otherwise, you can decrease your + * baseline slots every few minutes. + * + * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getSlotCapacity() + { + return $this->slot_capacity; + } + + /** + * Optional. Baseline 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, or autoscaling is enabled. + * The total slot_capacity of the reservation and its siblings + * may exceed the total slot_count of capacity commitments. In that case, the + * exceeding slots will be charged with the autoscale SKU. You can increase + * the number of baseline slots in a reservation every few minutes. If you + * want to decrease your baseline slots, you are limited to once an hour if + * you have recently changed your baseline slot capacity and your baseline + * slots exceed your committed slots. Otherwise, you can decrease your + * baseline slots every few minutes. + * + * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setSlotCapacity($var) + { + GPBUtil::checkInt64($var); + $this->slot_capacity = $var; + + return $this; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreIdleSlots() + { + return $this->ignore_idle_slots; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreIdleSlots($var) + { + GPBUtil::checkBool($var); + $this->ignore_idle_slots = $var; + + return $this; + } + + /** + * Optional. The configuration parameters for the auto scaling feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The configuration parameters for the auto scaling feature. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. 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 BigQuery CLI. + * + * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getConcurrency() + { + return $this->concurrency; + } + + /** + * Optional. 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 BigQuery CLI. + * + * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @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 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getMultiRegionAuxiliary() + { + if ($this->multi_region_auxiliary !== false) { + @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); + } + 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 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setMultiRegionAuxiliary($var) + { + @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->multi_region_auxiliary = $var; + + return $this; + } + + /** + * Optional. Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Optional. Edition of the reservation. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); + $this->edition = $var; + + return $this; + } + + /** + * Output only. The current location of the reservation's primary replica. + * This field is only set for reservations using the managed disaster recovery + * feature. + * + * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getPrimaryLocation() + { + return $this->primary_location; + } + + /** + * Output only. The current location of the reservation's primary replica. + * This field is only set for reservations using the managed disaster recovery + * feature. + * + * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrimaryLocation($var) + { + GPBUtil::checkString($var, True); + $this->primary_location = $var; + + return $this; + } + + /** + * Optional. The current location of the reservation's secondary replica. This + * field is only set for reservations using the managed disaster recovery + * feature. Users can set this in create reservation calls + * to create a failover reservation or in update reservation calls to convert + * a non-failover reservation to a failover reservation(or vice versa). + * + * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSecondaryLocation() + { + return $this->secondary_location; + } + + /** + * Optional. The current location of the reservation's secondary replica. This + * field is only set for reservations using the managed disaster recovery + * feature. Users can set this in create reservation calls + * to create a failover reservation or in update reservation calls to convert + * a non-failover reservation to a failover reservation(or vice versa). + * + * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecondaryLocation($var) + { + GPBUtil::checkString($var, True); + $this->secondary_location = $var; + + return $this; + } + + /** + * Output only. The location where the reservation was originally created. + * This is set only during the failover reservation's creation. All billing + * charges for the failover reservation will be applied to this location. + * + * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getOriginalPrimaryLocation() + { + return $this->original_primary_location; + } + + /** + * Output only. The location where the reservation was originally created. + * This is set only during the failover reservation's creation. All billing + * charges for the failover reservation will be applied to this location. + * + * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOriginalPrimaryLocation($var) + { + GPBUtil::checkString($var, True); + $this->original_primary_location = $var; + + return $this; + } + + /** + * Optional. The overall max slots for the reservation, covering slot_capacity + * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + * If present, the reservation won't use more than the specified number of + * slots, even if there is demand and supply (from idle slots). + * NOTE: capping a reservation's idle slot usage is best effort and its + * usage may exceed the max_slots value. However, in terms of + * autoscale.current_slots (which accounts for the additional added slots), it + * will never exceed the max_slots - baseline. + * This field must be set together with the scaling_mode enum value, + * otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * If the max_slots and scaling_mode are set, the autoscale or + * autoscale.max_slots field must be unset. Otherwise the request will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + * autoscale field may still be in the output. The autopscale.max_slots will + * always show as 0 and the autoscaler.current_slots will represent the + * current slots from autoscaler excluding idle slots. + * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + * then in the output, the autoscaler.max_slots will be 0 and the + * autoscaler.current_slots may be any value between 0 and 1000. + * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + * and idle slots usage is 200, then in the output, the autoscaler.max_slots + * will be 0 and the autoscaler.current_slots will not be higher than 700. + * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + * output, the autoscaler field will be null. + * If the max_slots and scaling_mode are set, then the ignore_idle_slots field + * must be aligned with the scaling_mode enum value.(See details in + * ScalingMode comments). Otherwise the request will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note, the max_slots is for user to manage the part of slots greater + * than the baseline. Therefore, we don't allow users to set max_slots smaller + * or equal to the baseline as it will not be meaningful. If the field is + * present and slot_capacity>=max_slots, requests will be rejected with error + * code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note that if max_slots is set to 0, we will treat it as unset. + * Customers can set max_slots to 0 and set scaling_mode to + * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + * + * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxSlots() + { + return isset($this->max_slots) ? $this->max_slots : 0; + } + + public function hasMaxSlots() + { + return isset($this->max_slots); + } + + public function clearMaxSlots() + { + unset($this->max_slots); + } + + /** + * Optional. The overall max slots for the reservation, covering slot_capacity + * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + * If present, the reservation won't use more than the specified number of + * slots, even if there is demand and supply (from idle slots). + * NOTE: capping a reservation's idle slot usage is best effort and its + * usage may exceed the max_slots value. However, in terms of + * autoscale.current_slots (which accounts for the additional added slots), it + * will never exceed the max_slots - baseline. + * This field must be set together with the scaling_mode enum value, + * otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * If the max_slots and scaling_mode are set, the autoscale or + * autoscale.max_slots field must be unset. Otherwise the request will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + * autoscale field may still be in the output. The autopscale.max_slots will + * always show as 0 and the autoscaler.current_slots will represent the + * current slots from autoscaler excluding idle slots. + * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + * then in the output, the autoscaler.max_slots will be 0 and the + * autoscaler.current_slots may be any value between 0 and 1000. + * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + * and idle slots usage is 200, then in the output, the autoscaler.max_slots + * will be 0 and the autoscaler.current_slots will not be higher than 700. + * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + * output, the autoscaler field will be null. + * If the max_slots and scaling_mode are set, then the ignore_idle_slots field + * must be aligned with the scaling_mode enum value.(See details in + * ScalingMode comments). Otherwise the request will be rejected with + * error code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note, the max_slots is for user to manage the part of slots greater + * than the baseline. Therefore, we don't allow users to set max_slots smaller + * or equal to the baseline as it will not be meaningful. If the field is + * present and slot_capacity>=max_slots, requests will be rejected with error + * code `google.rpc.Code.INVALID_ARGUMENT`. + * Please note that if max_slots is set to 0, we will treat it as unset. + * Customers can set max_slots to 0 and set scaling_mode to + * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + * + * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxSlots($var) + { + GPBUtil::checkInt64($var); + $this->max_slots = $var; + + return $this; + } + + /** + * Optional. The scaling mode for the reservation. + * If the field is present but max_slots is not present, requests will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getScalingMode() + { + return $this->scaling_mode; + } + + /** + * Optional. The scaling mode for the reservation. + * If the field is present but max_slots is not present, requests will be + * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setScalingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\ScalingMode::class); + $this->scaling_mode = $var; + + return $this; + } + + /** + * Optional. The labels associated with this reservation. You can use these + * to organize and group your reservations. + * You can set this property when you create or update a reservation. + * + * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels associated with this reservation. You can use these + * to organize and group your reservations. + * You can set this property when you create or update a reservation. + * + * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The reservation group that this reservation belongs to. + * You can set this property when you create or update a reservation. + * Reservations do not need to belong to a reservation group. + * Format: + * projects/{project}/locations/{location}/reservationGroups/{reservation_group} + * or just {reservation_group} + * + * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReservationGroup() + { + return $this->reservation_group; + } + + /** + * Optional. The reservation group that this reservation belongs to. + * You can set this property when you create or update a reservation. + * Reservations do not need to belong to a reservation group. + * Format: + * projects/{project}/locations/{location}/reservationGroups/{reservation_group} + * or just {reservation_group} + * + * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReservationGroup($var) + { + GPBUtil::checkString($var, True); + $this->reservation_group = $var; + + return $this; + } + + /** + * Output only. The Disaster Recovery(DR) replication status of the + * reservation. This is only available for the primary replicas of DR/failover + * reservations and provides information about the both the staleness of the + * secondary and the last error encountered while trying to replicate changes + * from the primary to the secondary. If this field is blank, it means that + * the reservation is either not a DR reservation or the reservation is a DR + * secondary or that any replication operations on the reservation have + * succeeded. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus|null + */ + public function getReplicationStatus() + { + return $this->replication_status; + } + + public function hasReplicationStatus() + { + return isset($this->replication_status); + } + + public function clearReplicationStatus() + { + unset($this->replication_status); + } + + /** + * Output only. The Disaster Recovery(DR) replication status of the + * reservation. This is only available for the primary replicas of DR/failover + * reservations and provides information about the both the staleness of the + * secondary and the last error encountered while trying to replicate changes + * from the primary to the secondary. If this field is blank, it means that + * the reservation is either not a DR reservation or the reservation is a DR + * secondary or that any replication operations on the reservation have + * succeeded. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus $var + * @return $this + */ + public function setReplicationStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus::class); + $this->replication_status = $var; + + return $this; + } + + /** + * Optional. The scheduling policy to use for jobs and queries running under + * this reservation. The scheduling policy controls how the reservation's + * resources are distributed. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy|null + */ + public function getSchedulingPolicy() + { + return $this->scheduling_policy; + } + + public function hasSchedulingPolicy() + { + return isset($this->scheduling_policy); + } + + public function clearSchedulingPolicy() + { + unset($this->scheduling_policy); + } + + /** + * Optional. The scheduling policy to use for jobs and queries running under + * this reservation. The scheduling policy controls how the reservation's + * resources are distributed. + * This feature is not yet generally available. + * + * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $var + * @return $this + */ + public function setSchedulingPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy::class); + $this->scheduling_policy = $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..7cf3ed324dda --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php @@ -0,0 +1,117 @@ +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]. Note: after users reduce + * max_slots, it may take a while before it can be propagated, so + * current_slots may stay in the original value and could be larger than + * max_slots for that brief period (less than one minute) + * + * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $current_slots = 0; + /** + * Optional. Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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]. Note: after users reduce + * max_slots, it may take a while before it can be propagated, so + * current_slots may stay in the original value and could be larger than + * max_slots for that brief period (less than one minute) + * @type int|string $max_slots + * Optional. 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]. Note: after users reduce + * max_slots, it may take a while before it can be propagated, so + * current_slots may stay in the original value and could be larger than + * max_slots for that brief period (less than one minute) + * + * 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]. Note: after users reduce + * max_slots, it may take a while before it can be propagated, so + * current_slots may stay in the original value and could be larger than + * max_slots for that brief period (less than one minute) + * + * 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; + } + + /** + * Optional. Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxSlots() + { + return $this->max_slots; + } + + /** + * Optional. Number of slots to be scaled when needed. + * + * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxSlots($var) + { + GPBUtil::checkInt64($var); + $this->max_slots = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php new file mode 100644 index 000000000000..013d9c7e0af4 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php @@ -0,0 +1,245 @@ +google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus + */ +class ReplicationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The last error encountered while trying to replicate changes + * from the primary to the secondary. This field is only available if the + * replication has not succeeded since. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The time at which the last error was encountered while + * trying to replicate changes from the primary to the secondary. This field + * is only available if the replication has not succeeded since. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_error_time = null; + /** + * Output only. A timestamp corresponding to the last change on the primary + * that was successfully replicated to the secondary. + * + * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_replication_time = null; + /** + * Output only. The time at which a soft failover for the reservation and + * its associated datasets was initiated. After this field is set, all + * subsequent changes to the reservation will be rejected unless a hard + * failover overrides this operation. This field will be cleared once the + * failover is complete. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $soft_failover_start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $error + * Output only. The last error encountered while trying to replicate changes + * from the primary to the secondary. This field is only available if the + * replication has not succeeded since. + * @type \Google\Protobuf\Timestamp $last_error_time + * Output only. The time at which the last error was encountered while + * trying to replicate changes from the primary to the secondary. This field + * is only available if the replication has not succeeded since. + * @type \Google\Protobuf\Timestamp $last_replication_time + * Output only. A timestamp corresponding to the last change on the primary + * that was successfully replicated to the secondary. + * @type \Google\Protobuf\Timestamp $soft_failover_start_time + * Output only. The time at which a soft failover for the reservation and + * its associated datasets was initiated. After this field is set, all + * subsequent changes to the reservation will be rejected unless a hard + * failover overrides this operation. This field will be cleared once the + * failover is complete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The last error encountered while trying to replicate changes + * from the primary to the secondary. This field is only available if the + * replication has not succeeded since. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.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. The last error encountered while trying to replicate changes + * from the primary to the secondary. This field is only available if the + * replication has not succeeded since. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.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; + } + + /** + * Output only. The time at which the last error was encountered while + * trying to replicate changes from the primary to the secondary. This field + * is only available if the replication has not succeeded since. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastErrorTime() + { + return $this->last_error_time; + } + + public function hasLastErrorTime() + { + return isset($this->last_error_time); + } + + public function clearLastErrorTime() + { + unset($this->last_error_time); + } + + /** + * Output only. The time at which the last error was encountered while + * trying to replicate changes from the primary to the secondary. This field + * is only available if the replication has not succeeded since. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastErrorTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_error_time = $var; + + return $this; + } + + /** + * Output only. A timestamp corresponding to the last change on the primary + * that was successfully replicated to the secondary. + * + * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReplicationTime() + { + return $this->last_replication_time; + } + + public function hasLastReplicationTime() + { + return isset($this->last_replication_time); + } + + public function clearLastReplicationTime() + { + unset($this->last_replication_time); + } + + /** + * Output only. A timestamp corresponding to the last change on the primary + * that was successfully replicated to the secondary. + * + * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReplicationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_replication_time = $var; + + return $this; + } + + /** + * Output only. The time at which a soft failover for the reservation and + * its associated datasets was initiated. After this field is set, all + * subsequent changes to the reservation will be rejected unless a hard + * failover overrides this operation. This field will be cleared once the + * failover is complete. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftFailoverStartTime() + { + return $this->soft_failover_start_time; + } + + public function hasSoftFailoverStartTime() + { + return isset($this->soft_failover_start_time); + } + + public function clearSoftFailoverStartTime() + { + unset($this->soft_failover_start_time); + } + + /** + * Output only. The time at which a soft failover for the reservation and + * its associated datasets was initiated. After this field is set, all + * subsequent changes to the reservation will be rejected unless a hard + * failover overrides this operation. This field will be cleared once the + * failover is complete. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftFailoverStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_failover_start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php new file mode 100644 index 000000000000..71693a7f4844 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.reservation.v1.Reservation.ScalingMode + */ +class ScalingMode +{ + /** + * Default value of ScalingMode. + * + * Generated from protobuf enum SCALING_MODE_UNSPECIFIED = 0; + */ + const SCALING_MODE_UNSPECIFIED = 0; + /** + * The reservation will scale up only using slots from autoscaling. It will + * not use any idle slots even if there may be some available. The upper + * limit that autoscaling can scale up to will be max_slots - baseline. + * For example, if max_slots is 1000, baseline is 200 and customer sets + * ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 + * slots and no idle slots will be used. + * Please note, in this mode, the ignore_idle_slots field must be set to + * true. Otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf enum AUTOSCALE_ONLY = 1; + */ + const AUTOSCALE_ONLY = 1; + /** + * The reservation will scale up using only idle slots contributed by + * other reservations or from unassigned commitments. If no idle slots are + * available it will not scale up further. If the idle slots which it is + * using are reclaimed by the contributing reservation(s) it may be forced + * to scale down. The max idle slots the reservation can be max_slots - + * baseline capacity. For example, if max_slots is 1000, baseline is 200 and + * customer sets ScalingMode to IDLE_SLOTS_ONLY, + * 1. if there are 1000 idle slots available in other reservations, the + * reservation will scale up to 1000 slots with 200 baseline and 800 idle + * slots. + * 2. if there are 500 idle slots available in other reservations, the + * reservation will scale up to 700 slots with 200 baseline and 500 idle + * slots. + * Please note, in this mode, the reservation might not be able to scale up + * to max_slots. + * Please note, in this mode, the ignore_idle_slots field must be set to + * false. Otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf enum IDLE_SLOTS_ONLY = 2; + */ + const IDLE_SLOTS_ONLY = 2; + /** + * The reservation will scale up using all slots available to it. It will + * use idle slots contributed by other reservations or from unassigned + * commitments first. If no idle slots are available it will scale up using + * autoscaling. For example, if max_slots is 1000, baseline is 200 and + * customer sets ScalingMode to ALL_SLOTS, + * 1. if there are 800 idle slots available in other reservations, the + * reservation will scale up to 1000 slots with 200 baseline and 800 idle + * slots. + * 2. if there are 500 idle slots available in other reservations, the + * reservation will scale up to 1000 slots with 200 baseline, 500 idle + * slots and 300 autoscaling slots. + * 3. if there are no idle slots available in other reservations, it will + * scale up to 1000 slots with 200 baseline and 800 autoscaling slots. + * Please note, in this mode, the ignore_idle_slots field must be set to + * false. Otherwise the request will be rejected with error code + * `google.rpc.Code.INVALID_ARGUMENT`. + * + * Generated from protobuf enum ALL_SLOTS = 3; + */ + const ALL_SLOTS = 3; + + private static $valueToName = [ + self::SCALING_MODE_UNSPECIFIED => 'SCALING_MODE_UNSPECIFIED', + self::AUTOSCALE_ONLY => 'AUTOSCALE_ONLY', + self::IDLE_SLOTS_ONLY => 'IDLE_SLOTS_ONLY', + self::ALL_SLOTS => 'ALL_SLOTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/ReservationGroup.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php new file mode 100644 index 000000000000..c33ac03c6149 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php @@ -0,0 +1,83 @@ +google.cloud.bigquery.reservation.v1.ReservationGroup + */ +class ReservationGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the reservation group, e.g., + * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. + * The reservation_group_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) = IDENTIFIER]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the reservation group, e.g., + * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. + * The reservation_group_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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the reservation group, e.g., + * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. + * The reservation_group_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) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the reservation group, e.g., + * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. + * The reservation_group_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) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php new file mode 100644 index 000000000000..d9d7023609bf --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php @@ -0,0 +1,145 @@ +google.cloud.bigquery.reservation.v1.SchedulingPolicy + */ +class SchedulingPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * concurrency of jobs running for any particular project within it to the + * given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $concurrency = null; + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * slot consumption of queries running for any particular project within it to + * the given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_slots = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $concurrency + * Optional. If present and > 0, the reservation will attempt to limit the + * concurrency of jobs running for any particular project within it to the + * given value. + * This feature is not yet generally available. + * @type int|string $max_slots + * Optional. If present and > 0, the reservation will attempt to limit the + * slot consumption of queries running for any particular project within it to + * the given value. + * This feature is not yet generally available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * concurrency of jobs running for any particular project within it to the + * given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getConcurrency() + { + return isset($this->concurrency) ? $this->concurrency : 0; + } + + public function hasConcurrency() + { + return isset($this->concurrency); + } + + public function clearConcurrency() + { + unset($this->concurrency); + } + + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * concurrency of jobs running for any particular project within it to the + * given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setConcurrency($var) + { + GPBUtil::checkInt64($var); + $this->concurrency = $var; + + return $this; + } + + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * slot consumption of queries running for any particular project within it to + * the given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxSlots() + { + return isset($this->max_slots) ? $this->max_slots : 0; + } + + public function hasMaxSlots() + { + return isset($this->max_slots); + } + + public function clearMaxSlots() + { + unset($this->max_slots); + } + + /** + * Optional. If present and > 0, the reservation will attempt to limit the + * slot consumption of queries running for any particular project within it to + * the given value. + * This feature is not yet generally available. + * + * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxSlots($var) + { + GPBUtil::checkInt64($var); + $this->max_slots = $var; + + return $this; + } + +} + 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..f9f7236a3cc4 --- /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..8cb9e34764d8 --- /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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> + */ + 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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..9a0c2badc32c --- /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..f7a8a0f377e2 --- /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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> + */ + 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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..bdc3182f88ab --- /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..f8968ed298c2 --- /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..a59de4654657 --- /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 +{ + /** + * Optional. The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $project_id = ''; + /** + * Optional. The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dataset_id = ''; + /** + * Optional. The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $table_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Optional. The assigned project ID of the project. + * @type string $dataset_id + * Optional. The ID of the dataset in the above project. + * @type string $table_id + * Optional. 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); + } + + /** + * Optional. The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Optional. The assigned project ID of the project. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Optional. The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Optional. The ID of the dataset in the above project. + * + * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + + /** + * Optional. The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Optional. The ID of the table in the above dataset. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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..8dfae6d03330 --- /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..323b094e6e2b --- /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..39f34f5e455f --- /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..803b3b895a49 --- /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..260aca84de56 --- /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..348642c043d6 --- /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..156bdb0ea5b5 --- /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/create_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation_group.php new file mode 100644 index 000000000000..34cb2dbd8097 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation_group.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setReservationGroupId($reservationGroupId) + ->setReservationGroup($reservationGroup); + + // Call the API and handle any network failures. + try { + /** @var ReservationGroup $response */ + $response = $reservationServiceClient->createReservationGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]'); + $reservationGroupId = '[RESERVATION_GROUP_ID]'; + + create_reservation_group_sample($formattedParent, $reservationGroupId); +} +// [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_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..407f9295ba2a --- /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..d252076369ea --- /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..822b4fd656fc --- /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/delete_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation_group.php new file mode 100644 index 000000000000..191893302c9d --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation_group.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $reservationServiceClient->deleteReservationGroup($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::reservationGroupName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION_GROUP]' + ); + + delete_reservation_group_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php new file mode 100644 index 000000000000..e08330131210 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Reservation $response */ + $response = $reservationServiceClient->failoverReservation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]' + ); + + failover_reservation_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_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..e09c6f2e497a --- /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..faaaf2c8bfa3 --- /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_iam_policy.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..d4dfffc2f9b8 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_iam_policy.php @@ -0,0 +1,85 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_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..081b880f2e5a --- /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/get_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation_group.php new file mode 100644 index 000000000000..f6820c257f36 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation_group.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReservationGroup $response */ + $response = $reservationServiceClient->getReservationGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::reservationGroupName( + '[PROJECT]', + '[LOCATION]', + '[RESERVATION_GROUP]' + ); + + get_reservation_group_sample($formattedName); +} +// [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_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..c30ca29f847d --- /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..8058073ea7de --- /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_reservation_groups.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservation_groups.php new file mode 100644 index 000000000000..0fe83ffbd53d --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservation_groups.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reservationServiceClient->listReservationGroups($request); + + /** @var ReservationGroup $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_reservation_groups_sample($formattedParent); +} +// [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_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..57e42bdc7dbc --- /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..8c64ee7928db --- /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..8e2bce8e2f01 --- /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..9723c75ece98 --- /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..54bb0d1a8fee --- /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/set_iam_policy.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..b855fb6ce017 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/set_iam_policy.php @@ -0,0 +1,82 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_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..0d01200d3af6 --- /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/test_iam_permissions.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..26cc069ccb02 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/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 = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_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..7902e05748bb --- /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..3b2c32a698f7 --- /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..e49d16d4c0f2 --- /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..331faa64ef9a --- /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..14e5982b3ec2 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php @@ -0,0 +1,1349 @@ + createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReservationGroupAsync(CreateReservationGroupRequest $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 deleteReservationGroupAsync(DeleteReservationGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface failoverReservationAsync(FailoverReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReservationGroupAsync(GetReservationGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReservationGroupsAsync(ListReservationGroupsRequest $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 setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reservation_group resource. + * + * @param string $project + * @param string $location + * @param string $reservationGroup + * + * @return string The formatted reservation_group resource. + */ + public static function reservationGroupName(string $project, string $location, string $reservationGroup): string + { + return self::getPathTemplate('reservationGroup')->render([ + 'project' => $project, + 'location' => $location, + 'reservation_group' => $reservationGroup, + ]); + } + + /** + * 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} + * - reservationGroup: projects/{project}/locations/{location}/reservationGroups/{reservation_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|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigqueryreservation.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\BigQuery\Reservation\V1\ReservationServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ReservationServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates 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(); + } + + /** + * Creates a new reservation group. + * + * The async variant is + * {@see ReservationServiceClient::createReservationGroupAsync()} . + * + * @example samples/V1/ReservationServiceClient/create_reservation_group.php + * + * @param CreateReservationGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReservationGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReservationGroup(CreateReservationGroupRequest $request, array $callOptions = []): ReservationGroup + { + return $this->startApiCall('CreateReservationGroup', $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(); + } + + /** + * Deletes a reservation. + * Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + * assignments. + * + * The async variant is + * {@see ReservationServiceClient::deleteReservationGroupAsync()} . + * + * @example samples/V1/ReservationServiceClient/delete_reservation_group.php + * + * @param DeleteReservationGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReservationGroup(DeleteReservationGroupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReservationGroup', $request, $callOptions)->wait(); + } + + /** + * Fail over a reservation to the secondary location. The operation should be + * done in the current secondary location, which will be promoted to the + * new primary location for the reservation. + * Attempting to failover a reservation in the current primary location will + * fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + * + * The async variant is {@see ReservationServiceClient::failoverReservationAsync()} + * . + * + * @example samples/V1/ReservationServiceClient/failover_reservation.php + * + * @param FailoverReservationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 failoverReservation(FailoverReservationRequest $request, array $callOptions = []): Reservation + { + return $this->startApiCall('FailoverReservation', $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(); + } + + /** + * Gets the access control policy for a resource. + * May return: + * + * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + * permission to view it. + * * An empty policy if the resource exists but doesn't have a set policy. + * + * Supported resources are: + * - Reservations + * - ReservationAssignments + * + * To call this method, you must have the following Google IAM permissions: + * + * - `bigqueryreservation.reservations.getIamPolicy` to get policies on + * reservations. + * + * The async variant is {@see ReservationServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ReservationServiceClient/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 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(); + } + + /** + * Returns information about the reservation group. + * + * The async variant is {@see ReservationServiceClient::getReservationGroupAsync()} + * . + * + * @example samples/V1/ReservationServiceClient/get_reservation_group.php + * + * @param GetReservationGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReservationGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReservationGroup(GetReservationGroupRequest $request, array $callOptions = []): ReservationGroup + { + return $this->startApiCall('GetReservationGroup', $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 reservation groups for the project in the specified location. + * + * The async variant is + * {@see ReservationServiceClient::listReservationGroupsAsync()} . + * + * @example samples/V1/ReservationServiceClient/list_reservation_groups.php + * + * @param ListReservationGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReservationGroups(ListReservationGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReservationGroups', $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); + } + + /** + * Sets an access control policy for a resource. Replaces any existing + * policy. + * + * Supported resources are: + * - Reservations + * + * To call this method, you must have the following Google IAM permissions: + * + * - `bigqueryreservation.reservations.setIamPolicy` to set policies on + * reservations. + * + * The async variant is {@see ReservationServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ReservationServiceClient/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(); + } + + /** + * 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(); + } + + /** + * Gets your permissions on a resource. Returns an empty set of permissions if + * the resource doesn't exist. + * + * Supported resources are: + * - Reservations + * + * No Google IAM permissions are required to call this method. + * + * The async variant is {@see ReservationServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/ReservationServiceClient/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 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..6fe459fa920c --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "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" + ] + }, + "CreateReservationGroup": { + "methods": [ + "createReservationGroup" + ] + }, + "DeleteAssignment": { + "methods": [ + "deleteAssignment" + ] + }, + "DeleteCapacityCommitment": { + "methods": [ + "deleteCapacityCommitment" + ] + }, + "DeleteReservation": { + "methods": [ + "deleteReservation" + ] + }, + "DeleteReservationGroup": { + "methods": [ + "deleteReservationGroup" + ] + }, + "FailoverReservation": { + "methods": [ + "failoverReservation" + ] + }, + "GetBiReservation": { + "methods": [ + "getBiReservation" + ] + }, + "GetCapacityCommitment": { + "methods": [ + "getCapacityCommitment" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetReservation": { + "methods": [ + "getReservation" + ] + }, + "GetReservationGroup": { + "methods": [ + "getReservationGroup" + ] + }, + "ListAssignments": { + "methods": [ + "listAssignments" + ] + }, + "ListCapacityCommitments": { + "methods": [ + "listCapacityCommitments" + ] + }, + "ListReservationGroups": { + "methods": [ + "listReservationGroups" + ] + }, + "ListReservations": { + "methods": [ + "listReservations" + ] + }, + "MergeCapacityCommitments": { + "methods": [ + "mergeCapacityCommitments" + ] + }, + "MoveAssignment": { + "methods": [ + "moveAssignment" + ] + }, + "SearchAllAssignments": { + "methods": [ + "searchAllAssignments" + ] + }, + "SearchAssignments": { + "methods": [ + "searchAssignments" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "SplitCapacityCommitment": { + "methods": [ + "splitCapacityCommitment" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "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..cfb23efbb0f3 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json @@ -0,0 +1,190 @@ +{ + "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" + }, + "CreateReservationGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "DeleteReservationGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FailoverReservation": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetReservation": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetReservationGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "ListReservationGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SplitCapacityCommitment": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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..def998d1983a --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php @@ -0,0 +1,436 @@ + [ + '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', + ], + ], + ], + ], + 'CreateReservationGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ReservationGroup', + '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', + ], + ], + ], + ], + 'DeleteReservationGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FailoverReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', + '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', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReservationGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ReservationGroup', + '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', + ], + ], + ], + ], + 'ListReservationGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReservationGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListReservationGroupsResponse', + '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', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'SplitCapacityCommitment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + '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}', + 'reservationGroup' => 'projects/{project}/locations/{location}/reservationGroups/{reservation_group}', + ], + ], + ], +]; 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..5e4ea53c2316 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php @@ -0,0 +1,389 @@ + [ + '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', + ], + ], + ], + ], + 'CreateReservationGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservationGroups', + 'body' => 'reservation_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'reservation_group_id', + ], + ], + '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', + ], + ], + ], + ], + 'DeleteReservationGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservationGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FailoverReservation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}:failoverReservation', + 'body' => '*', + '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', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetReservation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReservationGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservationGroups/*}', + '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', + ], + ], + ], + ], + 'ListReservationGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservationGroups', + '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', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SplitCapacityCommitment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}:split', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + '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..87aa81d25836 --- /dev/null +++ b/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php @@ -0,0 +1,2133 @@ +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'; + $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); + $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; + $isFlatRate = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setIsFlatRate($isFlatRate); + $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; + $primaryLocation = 'primaryLocation182084946'; + $secondaryLocation = 'secondaryLocation-1339637216'; + $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; + $maxSlots = 234568806; + $reservationGroup = 'reservationGroup-2146724788'; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setPrimaryLocation($primaryLocation); + $expectedResponse->setSecondaryLocation($secondaryLocation); + $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); + $expectedResponse->setMaxSlots($maxSlots); + $expectedResponse->setReservationGroup($reservationGroup); + $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 createReservationGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ReservationGroup(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $reservationGroupId = 'reservationGroupId-1015027218'; + $reservationGroup = new ReservationGroup(); + $request = (new CreateReservationGroupRequest()) + ->setParent($formattedParent) + ->setReservationGroupId($reservationGroupId) + ->setReservationGroup($reservationGroup); + $response = $gapicClient->createReservationGroup($request); + $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/CreateReservationGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReservationGroupId(); + $this->assertProtobufEquals($reservationGroupId, $actualValue); + $actualValue = $actualRequestObject->getReservationGroup(); + $this->assertProtobufEquals($reservationGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReservationGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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]'); + $reservationGroupId = 'reservationGroupId-1015027218'; + $reservationGroup = new ReservationGroup(); + $request = (new CreateReservationGroupRequest()) + ->setParent($formattedParent) + ->setReservationGroupId($reservationGroupId) + ->setReservationGroup($reservationGroup); + try { + $gapicClient->createReservationGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 deleteReservationGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); + $request = (new DeleteReservationGroupRequest()) + ->setName($formattedName); + $gapicClient->deleteReservationGroup($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/DeleteReservationGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReservationGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); + $request = (new DeleteReservationGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReservationGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverReservationTest() + { + $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; + $primaryLocation = 'primaryLocation182084946'; + $secondaryLocation = 'secondaryLocation-1339637216'; + $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; + $maxSlots = 234568806; + $reservationGroup = 'reservationGroup-2146724788'; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name2); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setPrimaryLocation($primaryLocation); + $expectedResponse->setSecondaryLocation($secondaryLocation); + $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); + $expectedResponse->setMaxSlots($maxSlots); + $expectedResponse->setReservationGroup($reservationGroup); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); + $request = (new FailoverReservationRequest()) + ->setName($formattedName); + $response = $gapicClient->failoverReservation($request); + $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/FailoverReservation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverReservationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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 FailoverReservationRequest()) + ->setName($formattedName); + try { + $gapicClient->failoverReservation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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; + $isFlatRate = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name2); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setIsFlatRate($isFlatRate); + $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 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.reservation.v1.ReservationService/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 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; + $primaryLocation = 'primaryLocation182084946'; + $secondaryLocation = 'secondaryLocation-1339637216'; + $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; + $maxSlots = 234568806; + $reservationGroup = 'reservationGroup-2146724788'; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name2); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setPrimaryLocation($primaryLocation); + $expectedResponse->setSecondaryLocation($secondaryLocation); + $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); + $expectedResponse->setMaxSlots($maxSlots); + $expectedResponse->setReservationGroup($reservationGroup); + $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 getReservationGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ReservationGroup(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); + $request = (new GetReservationGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getReservationGroup($request); + $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/GetReservationGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReservationGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); + $request = (new GetReservationGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getReservationGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 listReservationGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reservationGroupsElement = new ReservationGroup(); + $reservationGroups = [ + $reservationGroupsElement, + ]; + $expectedResponse = new ListReservationGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReservationGroups($reservationGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReservationGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReservationGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReservationGroups()[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/ListReservationGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReservationGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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 ListReservationGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReservationGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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; + $isFlatRate = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setIsFlatRate($isFlatRate); + $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'; + $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name2); + $expectedResponse->setAssignee($assignee); + $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); + $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 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.reservation.v1.ReservationService/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 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 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.reservation.v1.ReservationService/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 updateAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $assignee = 'assignee-369881649'; + $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); + $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; + $isFlatRate = false; + $expectedResponse = new CapacityCommitment(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCount($slotCount); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setIsFlatRate($isFlatRate); + $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; + $primaryLocation = 'primaryLocation182084946'; + $secondaryLocation = 'secondaryLocation-1339637216'; + $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; + $maxSlots = 234568806; + $reservationGroup = 'reservationGroup-2146724788'; + $expectedResponse = new Reservation(); + $expectedResponse->setName($name); + $expectedResponse->setSlotCapacity($slotCapacity); + $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); + $expectedResponse->setConcurrency($concurrency); + $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); + $expectedResponse->setPrimaryLocation($primaryLocation); + $expectedResponse->setSecondaryLocation($secondaryLocation); + $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); + $expectedResponse->setMaxSlots($maxSlots); + $expectedResponse->setReservationGroup($reservationGroup); + $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'; + $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; + $expectedResponse = new Assignment(); + $expectedResponse->setName($name); + $expectedResponse->setAssignee($assignee); + $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); + $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()); + } +} From be5d4ce8eb2ea62f3f55788ec06fbb1a3033b20a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Apr 2026 23:10:49 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/Reservation.php | 2 +- BigQueryReservation/src/V1/Assignment.php | 82 + .../src/V1/Reservation/ScalingMode.php | 2 +- .../Client/ReservationServiceClientTest.php | 8 + .../Bigquery/Reservation/V1/Reservation.php | 34 - .../BigQuery/Reservation/V1/Assignment.php | 385 --- .../Reservation/V1/Assignment/JobType.php | 114 - .../Reservation/V1/Assignment/State.php | 64 - .../BigQuery/Reservation/V1/BiReservation.php | 187 -- .../Reservation/V1/CapacityCommitment.php | 535 ----- .../V1/CapacityCommitment/CommitmentPlan.php | 131 - .../V1/CapacityCommitment/State.php | 71 - .../V1/CreateAssignmentRequest.php | 181 -- .../V1/CreateCapacityCommitmentRequest.php | 221 -- .../V1/CreateReservationGroupRequest.php | 158 -- .../V1/CreateReservationRequest.php | 179 -- .../V1/DeleteAssignmentRequest.php | 89 - .../V1/DeleteCapacityCommitmentRequest.php | 129 - .../V1/DeleteReservationGroupRequest.php | 87 - .../V1/DeleteReservationRequest.php | 87 - .../Cloud/BigQuery/Reservation/V1/Edition.php | 70 - .../BigQuery/Reservation/V1/FailoverMode.php | 67 - .../V1/FailoverReservationRequest.php | 113 - .../V1/GetBiReservationRequest.php | 86 - .../V1/GetCapacityCommitmentRequest.php | 87 - .../V1/GetReservationGroupRequest.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/ListReservationGroupsRequest.php | 155 -- .../V1/ListReservationGroupsResponse.php | 106 - .../V1/ListReservationsRequest.php | 155 -- .../V1/ListReservationsResponse.php | 106 - .../V1/MergeCapacityCommitmentsRequest.php | 188 -- .../Reservation/V1/MoveAssignmentRequest.php | 184 -- .../BigQuery/Reservation/V1/Reservation.php | 1084 --------- .../Reservation/V1/Reservation/Autoscale.php | 117 - .../V1/Reservation/ReplicationStatus.php | 245 -- .../V1/Reservation/ScalingMode.php | 109 - .../Reservation/V1/ReservationGroup.php | 83 - .../Reservation/V1/SchedulingPolicy.php | 145 -- .../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 - .../create_reservation_group.php | 81 - .../delete_assignment.php | 89 - .../delete_capacity_commitment.php | 76 - .../delete_reservation.php | 76 - .../delete_reservation_group.php | 76 - .../failover_reservation.php | 80 - .../get_bi_reservation.php | 72 - .../get_capacity_commitment.php | 76 - .../get_iam_policy.php | 85 - .../get_reservation.php | 76 - .../get_reservation_group.php | 76 - .../list_assignments.php | 106 - .../list_capacity_commitments.php | 77 - .../list_reservation_groups.php | 77 - .../list_reservations.php | 77 - .../merge_capacity_commitments.php | 63 - .../move_assignment.php | 82 - .../search_all_assignments.php | 97 - .../search_assignments.php | 100 - .../set_iam_policy.php | 82 - .../split_capacity_commitment.php | 83 - .../test_iam_permissions.php | 84 - .../update_assignment.php | 59 - .../update_bi_reservation.php | 64 - .../update_capacity_commitment.php | 63 - .../update_reservation.php | 57 - .../V1/Client/ReservationServiceClient.php | 1349 ----------- .../v1/src/V1/gapic_metadata.json | 163 -- .../reservation_service_client_config.json | 190 -- .../reservation_service_descriptor_config.php | 436 ---- ...reservation_service_rest_client_config.php | 389 --- .../Client/ReservationServiceClientTest.php | 2133 ----------------- 89 files changed, 92 insertions(+), 14991 deletions(-) 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/CreateReservationGroupRequest.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/DeleteReservationGroupRequest.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/FailoverMode.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.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/GetReservationGroupRequest.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/ListReservationGroupsRequest.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.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/Reservation/ReplicationStatus.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.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/create_reservation_group.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/delete_reservation_group.php delete mode 100644 owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_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_iam_policy.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/get_reservation_group.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_reservation_groups.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/set_iam_policy.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/test_iam_permissions.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 diff --git a/BigQueryReservation/metadata/V1/Reservation.php b/BigQueryReservation/metadata/V1/Reservation.php index 8ca9860afaf1..6711458b8138 100644 --- a/BigQueryReservation/metadata/V1/Reservation.php +++ b/BigQueryReservation/metadata/V1/Reservation.php @@ -25,7 +25,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); \GPBMetadata\Google\Rpc\Status::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xC6\x83\x01\x0A6google/cloud/bigquery/reservation/v1/reservation.proto\x12\$google.cloud.bigquery.reservation.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFC\x0C\x0A\x0BReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dslot_capacity\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x1E\x0A\x11ignore_idle_slots\x18\x04 \x01(\x08B\x03\xE0A\x01\x12S\x0A\x09autoscale\x18\x07 \x01(\x0B2;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xE0A\x01\x12\x18\x0A\x0Bconcurrency\x18\x10 \x01(\x03B\x03\xE0A\x01\x126\x0A\x0Dcreation_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\"\x0A\x16multi_region_auxiliary\x18\x0E \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x11 \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12C\x0A\x10primary_location\x18\x12 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12E\x0A\x12secondary_location\x18\x13 \x01(\x09B)\xE0A\x01\xFAA#\x0A!locations.googleapis.com/Location\x12L\x0A\x19original_primary_location\x18\x14 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12\x1B\x0A\x09max_slots\x18\x15 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12X\x0A\x0Cscaling_mode\x18\x16 \x01(\x0E2=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xE0A\x01\x12R\x0A\x06labels\x18\x17 \x03(\x0B2=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xE0A\x01\x12\x1E\x0A\x11reservation_group\x18\x19 \x01(\x09B\x03\xE0A\x01\x12d\x0A\x12replication_status\x18\x18 \x01(\x0B2C.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xE0A\x03\x12V\x0A\x11scheduling_policy\x18\x1B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x1A?\x0A\x09Autoscale\x12\x1A\x0A\x0Dcurrent_slots\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x16\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01\x1A\xF8\x01\x0A\x11ReplicationStatus\x12&\x0A\x05error\x18\x01 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x128\x0A\x0Flast_error_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x15last_replication_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x18soft_failover_start_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"c\x0A\x0BScalingMode\x12\x1C\x0A\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EAUTOSCALE_ONLY\x10\x01\x12\x13\x0A\x0FIDLE_SLOTS_ONLY\x10\x02\x12\x0D\x0A\x09ALL_SLOTS\x10\x03:w\xEAAt\x0A.bigqueryreservation.googleapis.com/Reservation\x12Bprojects/{project}/locations/{location}/reservations/{reservation}B\x0C\x0A\x0A_max_slots\"l\x0A\x10SchedulingPolicy\x12\x1D\x0A\x0Bconcurrency\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1B\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x0E\x0A\x0C_concurrencyB\x0C\x0A\x0A_max_slots\"\xD5\x01\x0A\x10ReservationGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:\xAD\x01\xEAA\xA9\x01\x0A3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xAA\x08\x0A\x12CapacityCommitment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Aslot_count\x18\x02 \x01(\x03B\x03\xE0A\x01\x12Z\x0A\x04plan\x18\x03 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12R\x0A\x05state\x18\x04 \x01(\x0E2>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xE0A\x03\x12>\x0A\x15commitment_start_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x13commitment_end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x0Efailure_status\x18\x07 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x12b\x0A\x0Crenewal_plan\x18\x08 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12\"\x0A\x16multi_region_auxiliary\x18\x0A \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x0C \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12\x19\x0A\x0Cis_flat_rate\x18\x0E \x01(\x08B\x03\xE0A\x03\"\xCA\x01\x0A\x0ECommitmentPlan\x12\x1F\x0A\x1BCOMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\x0A\x04FLEX\x10\x03\x12\x16\x0A\x0EFLEX_FLAT_RATE\x10\x07\x1A\x02\x08\x01\x12\x0D\x0A\x05TRIAL\x10\x05\x1A\x02\x08\x01\x12\x0B\x0A\x07MONTHLY\x10\x02\x12\x19\x0A\x11MONTHLY_FLAT_RATE\x10\x08\x1A\x02\x08\x01\x12\x0A\x0A\x06ANNUAL\x10\x04\x12\x18\x0A\x10ANNUAL_FLAT_RATE\x10\x09\x1A\x02\x08\x01\x12\x0E\x0A\x0ATHREE_YEAR\x10\x0A\x12\x08\x0A\x04NONE\x10\x06\"C\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03:\x8E\x01\xEAA\x8A\x01\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xC2\x01\x0A\x18CreateReservationRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\x0A\x0Ereservation_id\x18\x02 \x01(\x09\x12F\x0A\x0Breservation\x18\x03 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\x0A\x17ListReservationsRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"|\x0A\x18ListReservationsResponse\x12G\x0A\x0Creservations\x18\x01 \x03(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"]\x0A\x15GetReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"`\x0A\x18DeleteReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\x0A\x18UpdateReservationRequest\x12F\x0A\x0Breservation\x18\x01 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xB2\x01\x0A\x1AFailoverReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\x12N\x0A\x0Dfailover_mode\x18\x02 \x01(\x0E22.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xE0A\x01\"\xE7\x01\x0A\x1DCreateReservationGroupRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12!\x0A\x14reservation_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12V\x0A\x11reservation_group\x18\x03 \x01(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xE0A\x02\"g\x0A\x1AGetReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\x0A\x1CListReservationGroupsRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x8C\x01\x0A\x1DListReservationGroupsResponse\x12R\x0A\x12reservation_groups\x18\x01 \x03(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"j\x0A\x1DDeleteReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\x0A\x1FCreateCapacityCommitmentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12U\x0A\x13capacity_commitment\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\x0A\$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1E\x0A\x16capacity_commitment_id\x18\x05 \x01(\x09\"\x96\x01\x0A\x1EListCapacityCommitmentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A\x1FListCapacityCommitmentsResponse\x12V\x0A\x14capacity_commitments\x18\x01 \x03(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"k\x0A\x1CGetCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\"}\x0A\x1FDeleteCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x0D\x0A\x05force\x18\x03 \x01(\x08\"\xA9\x01\x0A\x1FUpdateCapacityCommitmentRequest\x12U\x0A\x13capacity_commitment\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x81\x01\x0A\x1ESplitCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\x0A\x0Aslot_count\x18\x02 \x01(\x03\"\xB4\x01\x0A\x1FSplitCapacityCommitmentResponse\x12G\x0A\x05first\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\x0A\x06second\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xB3\x01\x0A\x1FMergeCapacityCommitmentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x1F\x0A\x17capacity_commitment_ids\x18\x02 \x03(\x09\x12#\x0A\x16capacity_commitment_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x99\x06\x0A\x0AAssignment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08assignee\x18\x04 \x01(\x09B\x03\xE0A\x01\x12O\x0A\x08job_type\x18\x03 \x01(\x0E28.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xE0A\x01\x12J\x0A\x05state\x18\x06 \x01(\x0E26.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xE0A\x03\x12(\x0A\x19enable_gemini_in_bigquery\x18\x0A \x01(\x08B\x05\x18\x01\xE0A\x01\x12V\x0A\x11scheduling_policy\x18\x0B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\"\xDC\x01\x0A\x07JobType\x12\x18\x0A\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08PIPELINE\x10\x01\x12\x09\x0A\x05QUERY\x10\x02\x12\x0F\x0A\x0BML_EXTERNAL\x10\x03\x12\x0E\x0A\x0ABACKGROUND\x10\x04\x12\x0E\x0A\x0ACONTINUOUS\x10\x06\x12\"\x0A\x1EBACKGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12\$\x0A BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\x0A\x1FBACKGROUND_SEARCH_INDEX_REFRESH\x10\x09\"7\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02:\xA9\x01\xEAA\xA5\x01\x0A-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0Bassignments2\x0Aassignment\"\xBD\x01\x0A\x17CreateAssignmentRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12D\x0A\x0Aassignment\x18\x02 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\x0A\x0Dassignment_id\x18\x04 \x01(\x09\"\x86\x01\x0A\x16ListAssignmentsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x17ListAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"^\x0A\x17DeleteAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\"\x8B\x01\x0A\x18SearchAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"\x8E\x01\x0A\x1BSearchAllAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"{\x0A\x19SearchAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"~\x0A\x1CSearchAllAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBF\x01\x0A\x15MoveAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\x12J\x0A\x0Edestination_id\x18\x03 \x01(\x09B2\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\x0A\x0Dassignment_id\x18\x05 \x01(\x09\"\x90\x01\x0A\x17UpdateAssignmentRequest\x12D\x0A\x0Aassignment\x18\x01 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"Y\x0A\x0ETableReference\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Adataset_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08table_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xAE\x02\x0A\x0DBiReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x04 \x01(\x03B\x03\xE0A\x01\x12S\x0A\x10preferred_tables\x18\x05 \x03(\x0B24.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xE0A\x01:l\xEAAi\x0A0bigqueryreservation.googleapis.com/BiReservation\x125projects/{project}/locations/{location}/biReservation\"a\x0A\x17GetBiReservationRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0bigqueryreservation.googleapis.com/BiReservation\"\x9A\x01\x0A\x1AUpdateBiReservationRequest\x12K\x0A\x0Ebi_reservation\x18\x01 \x01(\x0B23.google.cloud.bigquery.reservation.v1.BiReservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask*U\x0A\x07Edition\x12\x17\x0A\x13EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\x12\x13\x0A\x0FENTERPRISE_PLUS\x10\x03*A\x0A\x0CFailoverMode\x12\x1D\x0A\x19FAILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SOFT\x10\x01\x12\x08\x0A\x04HARD\x10\x022\xA36\x0A\x12ReservationService\x12\xF1\x01\x0A\x11CreateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"i\xDAA!parent,reservation,reservation_id\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0Breservation\x12\xD4\x01\x0A\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1A>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/reservations\x12\xC1\x01\x0A\x0EGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/reservations/*}\x12\xAC\x01\x0A\x11DeleteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xF3\x01\x0A\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"k\xDAA\x17reservation,update_mask\x82\xD3\xE4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\x0Aassignment\x12\xDF\x01\x0A\x0FListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1A=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xB8\x01\x0A\x10DeleteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xE5\x01\x0A\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1A?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xEE\x01\x0A\x14SearchAllAssignments\x12A.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1AB.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xE5\x01\x0A\x0EMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"d\xDAA\x13name,destination_id\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xFB\x01\x0A\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"v\xDAA\x16assignment,update_mask\x82\xD3\xE4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\x0Aassignment\x12\xC6\x01\x0A\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\x0A\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\"s\xDAA\x1Abi_reservation,update_mask\x82\xD3\xE4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0Ebi_reservation\x12\xF4\x01\x0A\x0CGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xA8\x01\xDAA\x08resource\x82\xD3\xE4\x93\x02\x96\x01\x12A/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\x0A\x0CSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xB5\x01\xDAA\x0Fresource,policy\x82\xD3\xE4\x93\x02\x9C\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9B\x02\x0A\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"\xAF\x01\x82\xD3\xE4\x93\x02\xA8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xE7\x01\x0A\x16CreateReservationGroup\x12C.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xD5\x01\x0A\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xBB\x01\x0A\x16DeleteReservationGroup\x12C.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xE8\x01\x0A\x15ListReservationGroups\x12B.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1AC.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/reservationGroups\x1A\x7F\xCAA\"bigqueryreservation.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xD8\x01\x0A(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xAA\x02\$Google.Cloud.BigQuery.Reservation.V1\xCA\x02\$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" + "\x0A\xDE\x83\x01\x0A6google/cloud/bigquery/reservation/v1/reservation.proto\x12\$google.cloud.bigquery.reservation.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFC\x0C\x0A\x0BReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dslot_capacity\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x1E\x0A\x11ignore_idle_slots\x18\x04 \x01(\x08B\x03\xE0A\x01\x12S\x0A\x09autoscale\x18\x07 \x01(\x0B2;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xE0A\x01\x12\x18\x0A\x0Bconcurrency\x18\x10 \x01(\x03B\x03\xE0A\x01\x126\x0A\x0Dcreation_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\"\x0A\x16multi_region_auxiliary\x18\x0E \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x11 \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12C\x0A\x10primary_location\x18\x12 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12E\x0A\x12secondary_location\x18\x13 \x01(\x09B)\xE0A\x01\xFAA#\x0A!locations.googleapis.com/Location\x12L\x0A\x19original_primary_location\x18\x14 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12\x1B\x0A\x09max_slots\x18\x15 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12X\x0A\x0Cscaling_mode\x18\x16 \x01(\x0E2=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xE0A\x01\x12R\x0A\x06labels\x18\x17 \x03(\x0B2=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xE0A\x01\x12\x1E\x0A\x11reservation_group\x18\x19 \x01(\x09B\x03\xE0A\x01\x12d\x0A\x12replication_status\x18\x18 \x01(\x0B2C.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xE0A\x03\x12V\x0A\x11scheduling_policy\x18\x1B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x1A?\x0A\x09Autoscale\x12\x1A\x0A\x0Dcurrent_slots\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x16\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01\x1A\xF8\x01\x0A\x11ReplicationStatus\x12&\x0A\x05error\x18\x01 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x128\x0A\x0Flast_error_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x15last_replication_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x18soft_failover_start_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"c\x0A\x0BScalingMode\x12\x1C\x0A\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EAUTOSCALE_ONLY\x10\x01\x12\x13\x0A\x0FIDLE_SLOTS_ONLY\x10\x02\x12\x0D\x0A\x09ALL_SLOTS\x10\x03:w\xEAAt\x0A.bigqueryreservation.googleapis.com/Reservation\x12Bprojects/{project}/locations/{location}/reservations/{reservation}B\x0C\x0A\x0A_max_slots\"l\x0A\x10SchedulingPolicy\x12\x1D\x0A\x0Bconcurrency\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1B\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x0E\x0A\x0C_concurrencyB\x0C\x0A\x0A_max_slots\"\xD5\x01\x0A\x10ReservationGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:\xAD\x01\xEAA\xA9\x01\x0A3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xAA\x08\x0A\x12CapacityCommitment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Aslot_count\x18\x02 \x01(\x03B\x03\xE0A\x01\x12Z\x0A\x04plan\x18\x03 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12R\x0A\x05state\x18\x04 \x01(\x0E2>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xE0A\x03\x12>\x0A\x15commitment_start_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x13commitment_end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x0Efailure_status\x18\x07 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x12b\x0A\x0Crenewal_plan\x18\x08 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12\"\x0A\x16multi_region_auxiliary\x18\x0A \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x0C \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12\x19\x0A\x0Cis_flat_rate\x18\x0E \x01(\x08B\x03\xE0A\x03\"\xCA\x01\x0A\x0ECommitmentPlan\x12\x1F\x0A\x1BCOMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\x0A\x04FLEX\x10\x03\x12\x16\x0A\x0EFLEX_FLAT_RATE\x10\x07\x1A\x02\x08\x01\x12\x0D\x0A\x05TRIAL\x10\x05\x1A\x02\x08\x01\x12\x0B\x0A\x07MONTHLY\x10\x02\x12\x19\x0A\x11MONTHLY_FLAT_RATE\x10\x08\x1A\x02\x08\x01\x12\x0A\x0A\x06ANNUAL\x10\x04\x12\x18\x0A\x10ANNUAL_FLAT_RATE\x10\x09\x1A\x02\x08\x01\x12\x0E\x0A\x0ATHREE_YEAR\x10\x0A\x12\x08\x0A\x04NONE\x10\x06\"C\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03:\x8E\x01\xEAA\x8A\x01\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xC2\x01\x0A\x18CreateReservationRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\x0A\x0Ereservation_id\x18\x02 \x01(\x09\x12F\x0A\x0Breservation\x18\x03 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\x0A\x17ListReservationsRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"|\x0A\x18ListReservationsResponse\x12G\x0A\x0Creservations\x18\x01 \x03(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"]\x0A\x15GetReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"`\x0A\x18DeleteReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\x0A\x18UpdateReservationRequest\x12F\x0A\x0Breservation\x18\x01 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xB2\x01\x0A\x1AFailoverReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\x12N\x0A\x0Dfailover_mode\x18\x02 \x01(\x0E22.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xE0A\x01\"\xE7\x01\x0A\x1DCreateReservationGroupRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12!\x0A\x14reservation_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12V\x0A\x11reservation_group\x18\x03 \x01(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xE0A\x02\"g\x0A\x1AGetReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\x0A\x1CListReservationGroupsRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x8C\x01\x0A\x1DListReservationGroupsResponse\x12R\x0A\x12reservation_groups\x18\x01 \x03(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"j\x0A\x1DDeleteReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\x0A\x1FCreateCapacityCommitmentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12U\x0A\x13capacity_commitment\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\x0A\$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1E\x0A\x16capacity_commitment_id\x18\x05 \x01(\x09\"\x96\x01\x0A\x1EListCapacityCommitmentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A\x1FListCapacityCommitmentsResponse\x12V\x0A\x14capacity_commitments\x18\x01 \x03(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"k\x0A\x1CGetCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\"}\x0A\x1FDeleteCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x0D\x0A\x05force\x18\x03 \x01(\x08\"\xA9\x01\x0A\x1FUpdateCapacityCommitmentRequest\x12U\x0A\x13capacity_commitment\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x81\x01\x0A\x1ESplitCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\x0A\x0Aslot_count\x18\x02 \x01(\x03\"\xB4\x01\x0A\x1FSplitCapacityCommitmentResponse\x12G\x0A\x05first\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\x0A\x06second\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xB3\x01\x0A\x1FMergeCapacityCommitmentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x1F\x0A\x17capacity_commitment_ids\x18\x02 \x03(\x09\x12#\x0A\x16capacity_commitment_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xB1\x06\x0A\x0AAssignment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08assignee\x18\x04 \x01(\x09B\x03\xE0A\x01\x12O\x0A\x08job_type\x18\x03 \x01(\x0E28.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xE0A\x01\x12J\x0A\x05state\x18\x06 \x01(\x0E26.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xE0A\x03\x12(\x0A\x19enable_gemini_in_bigquery\x18\x0A \x01(\x08B\x05\x18\x01\xE0A\x01\x12V\x0A\x11scheduling_policy\x18\x0B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x12\x16\x0A\x09principal\x18\x0C \x01(\x09B\x03\xE0A\x01\"\xDC\x01\x0A\x07JobType\x12\x18\x0A\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08PIPELINE\x10\x01\x12\x09\x0A\x05QUERY\x10\x02\x12\x0F\x0A\x0BML_EXTERNAL\x10\x03\x12\x0E\x0A\x0ABACKGROUND\x10\x04\x12\x0E\x0A\x0ACONTINUOUS\x10\x06\x12\"\x0A\x1EBACKGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12\$\x0A BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\x0A\x1FBACKGROUND_SEARCH_INDEX_REFRESH\x10\x09\"7\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02:\xA9\x01\xEAA\xA5\x01\x0A-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0Bassignments2\x0Aassignment\"\xBD\x01\x0A\x17CreateAssignmentRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12D\x0A\x0Aassignment\x18\x02 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\x0A\x0Dassignment_id\x18\x04 \x01(\x09\"\x86\x01\x0A\x16ListAssignmentsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x17ListAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"^\x0A\x17DeleteAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\"\x8B\x01\x0A\x18SearchAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"\x8E\x01\x0A\x1BSearchAllAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"{\x0A\x19SearchAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"~\x0A\x1CSearchAllAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBF\x01\x0A\x15MoveAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\x12J\x0A\x0Edestination_id\x18\x03 \x01(\x09B2\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\x0A\x0Dassignment_id\x18\x05 \x01(\x09\"\x90\x01\x0A\x17UpdateAssignmentRequest\x12D\x0A\x0Aassignment\x18\x01 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"Y\x0A\x0ETableReference\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Adataset_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08table_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xAE\x02\x0A\x0DBiReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x04 \x01(\x03B\x03\xE0A\x01\x12S\x0A\x10preferred_tables\x18\x05 \x03(\x0B24.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xE0A\x01:l\xEAAi\x0A0bigqueryreservation.googleapis.com/BiReservation\x125projects/{project}/locations/{location}/biReservation\"a\x0A\x17GetBiReservationRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0bigqueryreservation.googleapis.com/BiReservation\"\x9A\x01\x0A\x1AUpdateBiReservationRequest\x12K\x0A\x0Ebi_reservation\x18\x01 \x01(\x0B23.google.cloud.bigquery.reservation.v1.BiReservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask*U\x0A\x07Edition\x12\x17\x0A\x13EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\x12\x13\x0A\x0FENTERPRISE_PLUS\x10\x03*A\x0A\x0CFailoverMode\x12\x1D\x0A\x19FAILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SOFT\x10\x01\x12\x08\x0A\x04HARD\x10\x022\xA36\x0A\x12ReservationService\x12\xF1\x01\x0A\x11CreateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"i\xDAA!parent,reservation,reservation_id\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0Breservation\x12\xD4\x01\x0A\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1A>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/reservations\x12\xC1\x01\x0A\x0EGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/reservations/*}\x12\xAC\x01\x0A\x11DeleteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xF3\x01\x0A\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"k\xDAA\x17reservation,update_mask\x82\xD3\xE4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\x0Aassignment\x12\xDF\x01\x0A\x0FListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1A=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xB8\x01\x0A\x10DeleteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xE5\x01\x0A\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1A?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xEE\x01\x0A\x14SearchAllAssignments\x12A.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1AB.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xE5\x01\x0A\x0EMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"d\xDAA\x13name,destination_id\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xFB\x01\x0A\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"v\xDAA\x16assignment,update_mask\x82\xD3\xE4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\x0Aassignment\x12\xC6\x01\x0A\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\x0A\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\"s\xDAA\x1Abi_reservation,update_mask\x82\xD3\xE4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0Ebi_reservation\x12\xF4\x01\x0A\x0CGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xA8\x01\xDAA\x08resource\x82\xD3\xE4\x93\x02\x96\x01\x12A/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\x0A\x0CSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xB5\x01\xDAA\x0Fresource,policy\x82\xD3\xE4\x93\x02\x9C\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9B\x02\x0A\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"\xAF\x01\x82\xD3\xE4\x93\x02\xA8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xE7\x01\x0A\x16CreateReservationGroup\x12C.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xD5\x01\x0A\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xBB\x01\x0A\x16DeleteReservationGroup\x12C.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xE8\x01\x0A\x15ListReservationGroups\x12B.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1AC.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/reservationGroups\x1A\x7F\xCAA\"bigqueryreservation.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xD8\x01\x0A(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xAA\x02\$Google.Cloud.BigQuery.Reservation.V1\xCA\x02\$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/BigQueryReservation/src/V1/Assignment.php b/BigQueryReservation/src/V1/Assignment.php index 5767bf195065..b624222eb5e7 100644 --- a/BigQueryReservation/src/V1/Assignment.php +++ b/BigQueryReservation/src/V1/Assignment.php @@ -65,6 +65,24 @@ class Assignment extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; */ protected $scheduling_policy = null; + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $principal = ''; /** * Constructor. @@ -96,6 +114,20 @@ class Assignment extends \Google\Protobuf\Internal\Message * policy controls how the reservation's resources are distributed. This * overrides the default scheduling policy specified on the reservation. * This feature is not yet generally available. + * @type string $principal + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. * } */ public function __construct($data = NULL) { @@ -299,5 +331,55 @@ public function setSchedulingPolicy($var) return $this; } + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrincipal() + { + return $this->principal; + } + + /** + * Optional. Represents the principal for this assignment. If not empty, jobs + * run by this principal will utilize the associated reservation. Otherwise, + * jobs will fall back to using the reservation assigned to the project, + * folder, or organization (in that order). If no reservation is assigned at + * any of these levels, on-demand capacity will be used. + * The supported formats are: + * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` + * for service accounts, + * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` + * for workload identity pool identities. + * * The special value `unknown_or_deleted_user` represents principals which + * cannot be read from the user info service, for example deleted users. + * + * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkString($var, True); + $this->principal = $var; + + return $this; + } + } diff --git a/BigQueryReservation/src/V1/Reservation/ScalingMode.php b/BigQueryReservation/src/V1/Reservation/ScalingMode.php index 910c60b27438..71693a7f4844 100644 --- a/BigQueryReservation/src/V1/Reservation/ScalingMode.php +++ b/BigQueryReservation/src/V1/Reservation/ScalingMode.php @@ -46,7 +46,7 @@ class ScalingMode * reservation will scale up to 1000 slots with 200 baseline and 800 idle * slots. * 2. if there are 500 idle slots available in other reservations, the - * reservation will scale up to 700 slots with 200 baseline and 300 idle + * reservation will scale up to 700 slots with 200 baseline and 500 idle * slots. * Please note, in this mode, the reservation might not be able to scale up * to max_slots. diff --git a/BigQueryReservation/tests/Unit/V1/Client/ReservationServiceClientTest.php b/BigQueryReservation/tests/Unit/V1/Client/ReservationServiceClientTest.php index 9e8b1e68dc22..5ce47b158cc1 100644 --- a/BigQueryReservation/tests/Unit/V1/Client/ReservationServiceClientTest.php +++ b/BigQueryReservation/tests/Unit/V1/Client/ReservationServiceClientTest.php @@ -116,10 +116,12 @@ public function createAssignmentTest() $name = 'name3373707'; $assignee = 'assignee-369881649'; $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; $expectedResponse = new Assignment(); $expectedResponse->setName($name); $expectedResponse->setAssignee($assignee); $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); @@ -1487,10 +1489,12 @@ public function moveAssignmentTest() $name2 = 'name2-1052831874'; $assignee = 'assignee-369881649'; $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; $expectedResponse = new Assignment(); $expectedResponse->setName($name2); $expectedResponse->setAssignee($assignee); $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->assignmentName('[PROJECT]', '[LOCATION]', '[RESERVATION]', '[ASSIGNMENT]'); @@ -1911,10 +1915,12 @@ public function updateAssignmentTest() $name = 'name3373707'; $assignee = 'assignee-369881649'; $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; $expectedResponse = new Assignment(); $expectedResponse->setName($name); $expectedResponse->setAssignee($assignee); $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); $transport->addResponse($expectedResponse); $request = new UpdateAssignmentRequest(); $response = $gapicClient->updateAssignment($request); @@ -2186,10 +2192,12 @@ public function createAssignmentAsyncTest() $name = 'name3373707'; $assignee = 'assignee-369881649'; $enableGeminiInBigquery = true; + $principal = 'principal-1812041682'; $expectedResponse = new Assignment(); $expectedResponse->setName($name); $expectedResponse->setAssignee($assignee); $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); + $expectedResponse->setPrincipal($principal); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); 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 6711458b8138..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Reservation/V1/Reservation.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDE\x83\x01\x0A6google/cloud/bigquery/reservation/v1/reservation.proto\x12\$google.cloud.bigquery.reservation.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFC\x0C\x0A\x0BReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dslot_capacity\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x1E\x0A\x11ignore_idle_slots\x18\x04 \x01(\x08B\x03\xE0A\x01\x12S\x0A\x09autoscale\x18\x07 \x01(\x0B2;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xE0A\x01\x12\x18\x0A\x0Bconcurrency\x18\x10 \x01(\x03B\x03\xE0A\x01\x126\x0A\x0Dcreation_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\"\x0A\x16multi_region_auxiliary\x18\x0E \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x11 \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12C\x0A\x10primary_location\x18\x12 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12E\x0A\x12secondary_location\x18\x13 \x01(\x09B)\xE0A\x01\xFAA#\x0A!locations.googleapis.com/Location\x12L\x0A\x19original_primary_location\x18\x14 \x01(\x09B)\xE0A\x03\xFAA#\x0A!locations.googleapis.com/Location\x12\x1B\x0A\x09max_slots\x18\x15 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12X\x0A\x0Cscaling_mode\x18\x16 \x01(\x0E2=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xE0A\x01\x12R\x0A\x06labels\x18\x17 \x03(\x0B2=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xE0A\x01\x12\x1E\x0A\x11reservation_group\x18\x19 \x01(\x09B\x03\xE0A\x01\x12d\x0A\x12replication_status\x18\x18 \x01(\x0B2C.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xE0A\x03\x12V\x0A\x11scheduling_policy\x18\x1B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x1A?\x0A\x09Autoscale\x12\x1A\x0A\x0Dcurrent_slots\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x16\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01\x1A\xF8\x01\x0A\x11ReplicationStatus\x12&\x0A\x05error\x18\x01 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x128\x0A\x0Flast_error_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x15last_replication_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x18soft_failover_start_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"c\x0A\x0BScalingMode\x12\x1C\x0A\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EAUTOSCALE_ONLY\x10\x01\x12\x13\x0A\x0FIDLE_SLOTS_ONLY\x10\x02\x12\x0D\x0A\x09ALL_SLOTS\x10\x03:w\xEAAt\x0A.bigqueryreservation.googleapis.com/Reservation\x12Bprojects/{project}/locations/{location}/reservations/{reservation}B\x0C\x0A\x0A_max_slots\"l\x0A\x10SchedulingPolicy\x12\x1D\x0A\x0Bconcurrency\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1B\x0A\x09max_slots\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x0E\x0A\x0C_concurrencyB\x0C\x0A\x0A_max_slots\"\xD5\x01\x0A\x10ReservationGroup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08:\xAD\x01\xEAA\xA9\x01\x0A3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xAA\x08\x0A\x12CapacityCommitment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Aslot_count\x18\x02 \x01(\x03B\x03\xE0A\x01\x12Z\x0A\x04plan\x18\x03 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12R\x0A\x05state\x18\x04 \x01(\x0E2>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xE0A\x03\x12>\x0A\x15commitment_start_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x13commitment_end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x0Efailure_status\x18\x07 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\x12b\x0A\x0Crenewal_plan\x18\x08 \x01(\x0E2G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xE0A\x01\x12\"\x0A\x16multi_region_auxiliary\x18\x0A \x01(\x08B\x02\x18\x01\x12C\x0A\x07edition\x18\x0C \x01(\x0E2-.google.cloud.bigquery.reservation.v1.EditionB\x03\xE0A\x01\x12\x19\x0A\x0Cis_flat_rate\x18\x0E \x01(\x08B\x03\xE0A\x03\"\xCA\x01\x0A\x0ECommitmentPlan\x12\x1F\x0A\x1BCOMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\x0A\x04FLEX\x10\x03\x12\x16\x0A\x0EFLEX_FLAT_RATE\x10\x07\x1A\x02\x08\x01\x12\x0D\x0A\x05TRIAL\x10\x05\x1A\x02\x08\x01\x12\x0B\x0A\x07MONTHLY\x10\x02\x12\x19\x0A\x11MONTHLY_FLAT_RATE\x10\x08\x1A\x02\x08\x01\x12\x0A\x0A\x06ANNUAL\x10\x04\x12\x18\x0A\x10ANNUAL_FLAT_RATE\x10\x09\x1A\x02\x08\x01\x12\x0E\x0A\x0ATHREE_YEAR\x10\x0A\x12\x08\x0A\x04NONE\x10\x06\"C\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03:\x8E\x01\xEAA\x8A\x01\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xC2\x01\x0A\x18CreateReservationRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\x0A\x0Ereservation_id\x18\x02 \x01(\x09\x12F\x0A\x0Breservation\x18\x03 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\x0A\x17ListReservationsRequest\x12F\x0A\x06parent\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"|\x0A\x18ListReservationsResponse\x12G\x0A\x0Creservations\x18\x01 \x03(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"]\x0A\x15GetReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"`\x0A\x18DeleteReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\x0A\x18UpdateReservationRequest\x12F\x0A\x0Breservation\x18\x01 \x01(\x0B21.google.cloud.bigquery.reservation.v1.Reservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\xB2\x01\x0A\x1AFailoverReservationRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.bigqueryreservation.googleapis.com/Reservation\x12N\x0A\x0Dfailover_mode\x18\x02 \x01(\x0E22.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xE0A\x01\"\xE7\x01\x0A\x1DCreateReservationGroupRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12!\x0A\x14reservation_group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12V\x0A\x11reservation_group\x18\x03 \x01(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xE0A\x02\"g\x0A\x1AGetReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\x0A\x1CListReservationGroupsRequest\x12K\x0A\x06parent\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x123bigqueryreservation.googleapis.com/ReservationGroup\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x8C\x01\x0A\x1DListReservationGroupsResponse\x12R\x0A\x12reservation_groups\x18\x01 \x03(\x0B26.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"j\x0A\x1DDeleteReservationGroupRequest\x12I\x0A\x04name\x18\x01 \x01(\x09B;\xE0A\x02\xFAA5\x0A3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\x0A\x1FCreateCapacityCommitmentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12U\x0A\x13capacity_commitment\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\x0A\$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1E\x0A\x16capacity_commitment_id\x18\x05 \x01(\x09\"\x96\x01\x0A\x1EListCapacityCommitmentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x92\x01\x0A\x1FListCapacityCommitmentsResponse\x12V\x0A\x14capacity_commitments\x18\x01 \x03(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"k\x0A\x1CGetCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\"}\x0A\x1FDeleteCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x0D\x0A\x05force\x18\x03 \x01(\x08\"\xA9\x01\x0A\x1FUpdateCapacityCommitmentRequest\x12U\x0A\x13capacity_commitment\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x81\x01\x0A\x1ESplitCapacityCommitmentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\x0A\x0Aslot_count\x18\x02 \x01(\x03\"\xB4\x01\x0A\x1FSplitCapacityCommitmentResponse\x12G\x0A\x05first\x18\x01 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\x0A\x06second\x18\x02 \x01(\x0B28.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xB3\x01\x0A\x1FMergeCapacityCommitmentsRequest\x12J\x0A\x06parent\x18\x01 \x01(\x09B:\xFAA7\x125bigqueryreservation.googleapis.com/CapacityCommitment\x12\x1F\x0A\x17capacity_commitment_ids\x18\x02 \x03(\x09\x12#\x0A\x16capacity_commitment_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xB1\x06\x0A\x0AAssignment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08assignee\x18\x04 \x01(\x09B\x03\xE0A\x01\x12O\x0A\x08job_type\x18\x03 \x01(\x0E28.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xE0A\x01\x12J\x0A\x05state\x18\x06 \x01(\x0E26.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xE0A\x03\x12(\x0A\x19enable_gemini_in_bigquery\x18\x0A \x01(\x08B\x05\x18\x01\xE0A\x01\x12V\x0A\x11scheduling_policy\x18\x0B \x01(\x0B26.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xE0A\x01\x12\x16\x0A\x09principal\x18\x0C \x01(\x09B\x03\xE0A\x01\"\xDC\x01\x0A\x07JobType\x12\x18\x0A\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08PIPELINE\x10\x01\x12\x09\x0A\x05QUERY\x10\x02\x12\x0F\x0A\x0BML_EXTERNAL\x10\x03\x12\x0E\x0A\x0ABACKGROUND\x10\x04\x12\x0E\x0A\x0ACONTINUOUS\x10\x06\x12\"\x0A\x1EBACKGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12\$\x0A BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\x0A\x1FBACKGROUND_SEARCH_INDEX_REFRESH\x10\x09\"7\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PENDING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02:\xA9\x01\xEAA\xA5\x01\x0A-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0Bassignments2\x0Aassignment\"\xBD\x01\x0A\x17CreateAssignmentRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12D\x0A\x0Aassignment\x18\x02 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\x0A\x0Dassignment_id\x18\x04 \x01(\x09\"\x86\x01\x0A\x16ListAssignmentsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"y\x0A\x17ListAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"^\x0A\x17DeleteAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\"\x8B\x01\x0A\x18SearchAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"\x8E\x01\x0A\x1BSearchAllAssignmentsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"{\x0A\x19SearchAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"~\x0A\x1CSearchAllAssignmentsResponse\x12E\x0A\x0Bassignments\x18\x01 \x03(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBF\x01\x0A\x15MoveAssignmentRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-bigqueryreservation.googleapis.com/Assignment\x12J\x0A\x0Edestination_id\x18\x03 \x01(\x09B2\xFAA/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\x0A\x0Dassignment_id\x18\x05 \x01(\x09\"\x90\x01\x0A\x17UpdateAssignmentRequest\x12D\x0A\x0Aassignment\x18\x01 \x01(\x0B20.google.cloud.bigquery.reservation.v1.Assignment\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"Y\x0A\x0ETableReference\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Adataset_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08table_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xAE\x02\x0A\x0DBiReservation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x04 \x01(\x03B\x03\xE0A\x01\x12S\x0A\x10preferred_tables\x18\x05 \x03(\x0B24.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xE0A\x01:l\xEAAi\x0A0bigqueryreservation.googleapis.com/BiReservation\x125projects/{project}/locations/{location}/biReservation\"a\x0A\x17GetBiReservationRequest\x12F\x0A\x04name\x18\x01 \x01(\x09B8\xE0A\x02\xFAA2\x0A0bigqueryreservation.googleapis.com/BiReservation\"\x9A\x01\x0A\x1AUpdateBiReservationRequest\x12K\x0A\x0Ebi_reservation\x18\x01 \x01(\x0B23.google.cloud.bigquery.reservation.v1.BiReservation\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask*U\x0A\x07Edition\x12\x17\x0A\x13EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\x12\x13\x0A\x0FENTERPRISE_PLUS\x10\x03*A\x0A\x0CFailoverMode\x12\x1D\x0A\x19FAILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SOFT\x10\x01\x12\x08\x0A\x04HARD\x10\x022\xA36\x0A\x12ReservationService\x12\xF1\x01\x0A\x11CreateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"i\xDAA!parent,reservation,reservation_id\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0Breservation\x12\xD4\x01\x0A\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1A>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/reservations\x12\xC1\x01\x0A\x0EGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/reservations/*}\x12\xAC\x01\x0A\x11DeleteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xF3\x01\x0A\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1A1.google.cloud.bigquery.reservation.v1.Reservation\"k\xDAA\x17reservation,update_mask\x82\xD3\xE4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\x0Aassignment\x12\xDF\x01\x0A\x0FListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1A=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xB8\x01\x0A\x10DeleteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xE5\x01\x0A\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1A?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xEE\x01\x0A\x14SearchAllAssignments\x12A.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1AB.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xE5\x01\x0A\x0EMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"d\xDAA\x13name,destination_id\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xFB\x01\x0A\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1A0.google.cloud.bigquery.reservation.v1.Assignment\"v\xDAA\x16assignment,update_mask\x82\xD3\xE4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\x0Aassignment\x12\xC6\x01\x0A\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\x0A\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1A3.google.cloud.bigquery.reservation.v1.BiReservation\"s\xDAA\x1Abi_reservation,update_mask\x82\xD3\xE4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0Ebi_reservation\x12\xF4\x01\x0A\x0CGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xA8\x01\xDAA\x08resource\x82\xD3\xE4\x93\x02\x96\x01\x12A/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\x0A\x0CSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"\xB5\x01\xDAA\x0Fresource,policy\x82\xD3\xE4\x93\x02\x9C\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9B\x02\x0A\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"\xAF\x01\x82\xD3\xE4\x93\x02\xA8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xE7\x01\x0A\x16CreateReservationGroup\x12C.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xD3\xE4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xD5\x01\x0A\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1A6.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xBB\x01\x0A\x16DeleteReservationGroup\x12C.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xE8\x01\x0A\x15ListReservationGroups\x12B.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1AC.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/reservationGroups\x1A\x7F\xCAA\"bigqueryreservation.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xD8\x01\x0A(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xAA\x02\$Google.Cloud.BigQuery.Reservation.V1\xCA\x02\$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - 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 b624222eb5e7..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment.php +++ /dev/null @@ -1,385 +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 = ''; - /** - * Optional. The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $assignee = ''; - /** - * Optional. Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - /** - * Optional. Deprecated: "Gemini in BigQuery" is now available by - * default for all BigQuery editions and should not be explicitly set. - * Controls if "Gemini in BigQuery" - * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - * enabled for this reservation assignment. - * - * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $enable_gemini_in_bigquery = false; - /** - * Optional. The scheduling policy to use for jobs and queries of this - * assignee when running under the associated reservation. The scheduling - * policy controls how the reservation's resources are distributed. This - * overrides the default scheduling policy specified on the reservation. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduling_policy = null; - /** - * Optional. Represents the principal for this assignment. If not empty, jobs - * run by this principal will utilize the associated reservation. Otherwise, - * jobs will fall back to using the reservation assigned to the project, - * folder, or organization (in that order). If no reservation is assigned at - * any of these levels, on-demand capacity will be used. - * The supported formats are: - * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` - * for service accounts, - * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` - * for workload identity pool identities. - * * The special value `unknown_or_deleted_user` represents principals which - * cannot be read from the user info service, for example deleted users. - * - * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $principal = ''; - - /** - * 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 - * Optional. The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * @type int $job_type - * Optional. Which type of jobs will use the reservation. - * @type int $state - * Output only. State of the assignment. - * @type bool $enable_gemini_in_bigquery - * Optional. Deprecated: "Gemini in BigQuery" is now available by - * default for all BigQuery editions and should not be explicitly set. - * Controls if "Gemini in BigQuery" - * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - * enabled for this reservation assignment. - * @type \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $scheduling_policy - * Optional. The scheduling policy to use for jobs and queries of this - * assignee when running under the associated reservation. The scheduling - * policy controls how the reservation's resources are distributed. This - * overrides the default scheduling policy specified on the reservation. - * This feature is not yet generally available. - * @type string $principal - * Optional. Represents the principal for this assignment. If not empty, jobs - * run by this principal will utilize the associated reservation. Otherwise, - * jobs will fall back to using the reservation assigned to the project, - * folder, or organization (in that order). If no reservation is assigned at - * any of these levels, on-demand capacity will be used. - * The supported formats are: - * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` - * for service accounts, - * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` - * for workload identity pool identities. - * * The special value `unknown_or_deleted_user` represents principals which - * cannot be read from the user info service, for example deleted users. - * } - */ - 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; - } - - /** - * Optional. The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAssignee() - { - return $this->assignee; - } - - /** - * Optional. The resource which will use the reservation. E.g. - * `projects/myproject`, `folders/123`, or `organizations/456`. - * - * Generated from protobuf field string assignee = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAssignee($var) - { - GPBUtil::checkString($var, True); - $this->assignee = $var; - - return $this; - } - - /** - * Optional. Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getJobType() - { - return $this->job_type; - } - - /** - * Optional. Which type of jobs will use the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Deprecated: "Gemini in BigQuery" is now available by - * default for all BigQuery editions and should not be explicitly set. - * Controls if "Gemini in BigQuery" - * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - * enabled for this reservation assignment. - * - * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - * @deprecated - */ - public function getEnableGeminiInBigquery() - { - if ($this->enable_gemini_in_bigquery !== false) { - @trigger_error('enable_gemini_in_bigquery is deprecated.', E_USER_DEPRECATED); - } - return $this->enable_gemini_in_bigquery; - } - - /** - * Optional. Deprecated: "Gemini in BigQuery" is now available by - * default for all BigQuery editions and should not be explicitly set. - * Controls if "Gemini in BigQuery" - * (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - * enabled for this reservation assignment. - * - * Generated from protobuf field bool enable_gemini_in_bigquery = 10 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setEnableGeminiInBigquery($var) - { - @trigger_error('enable_gemini_in_bigquery is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->enable_gemini_in_bigquery = $var; - - return $this; - } - - /** - * Optional. The scheduling policy to use for jobs and queries of this - * assignee when running under the associated reservation. The scheduling - * policy controls how the reservation's resources are distributed. This - * overrides the default scheduling policy specified on the reservation. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy|null - */ - public function getSchedulingPolicy() - { - return $this->scheduling_policy; - } - - public function hasSchedulingPolicy() - { - return isset($this->scheduling_policy); - } - - public function clearSchedulingPolicy() - { - unset($this->scheduling_policy); - } - - /** - * Optional. The scheduling policy to use for jobs and queries of this - * assignee when running under the associated reservation. The scheduling - * policy controls how the reservation's resources are distributed. This - * overrides the default scheduling policy specified on the reservation. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $var - * @return $this - */ - public function setSchedulingPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy::class); - $this->scheduling_policy = $var; - - return $this; - } - - /** - * Optional. Represents the principal for this assignment. If not empty, jobs - * run by this principal will utilize the associated reservation. Otherwise, - * jobs will fall back to using the reservation assigned to the project, - * folder, or organization (in that order). If no reservation is assigned at - * any of these levels, on-demand capacity will be used. - * The supported formats are: - * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` - * for service accounts, - * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` - * for workload identity pool identities. - * * The special value `unknown_or_deleted_user` represents principals which - * cannot be read from the user info service, for example deleted users. - * - * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrincipal() - { - return $this->principal; - } - - /** - * Optional. Represents the principal for this assignment. If not empty, jobs - * run by this principal will utilize the associated reservation. Otherwise, - * jobs will fall back to using the reservation assigned to the project, - * folder, or organization (in that order). If no reservation is assigned at - * any of these levels, on-demand capacity will be used. - * The supported formats are: - * * `principal://goog/subject/USER_EMAIL_ADDRESS` for users, - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS` - * for service accounts, - * * `principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID` - * for workload identity pool identities. - * * The special value `unknown_or_deleted_user` represents principals which - * cannot be read from the user info service, for example deleted users. - * - * Generated from protobuf field string principal = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkString($var, True); - $this->principal = $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 8ffad48780b6..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/JobType.php +++ /dev/null @@ -1,114 +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; - /** - * Continuous SQL jobs will use this reservation. Reservations with - * continuous assignments cannot be mixed with non-continuous assignments. - * - * Generated from protobuf enum CONTINUOUS = 6; - */ - const CONTINUOUS = 6; - /** - * Finer granularity background jobs for capturing changes in a source - * database and streaming them into BigQuery. Reservations with this job - * type take priority over a default BACKGROUND reservation assignment (if - * it exists). - * - * Generated from protobuf enum BACKGROUND_CHANGE_DATA_CAPTURE = 7; - */ - const BACKGROUND_CHANGE_DATA_CAPTURE = 7; - /** - * Finer granularity background jobs for refreshing cached metadata for - * BigQuery tables. Reservations with this job type take priority over a - * default BACKGROUND reservation assignment (if it exists). - * - * Generated from protobuf enum BACKGROUND_COLUMN_METADATA_INDEX = 8; - */ - const BACKGROUND_COLUMN_METADATA_INDEX = 8; - /** - * Finer granularity background jobs for refreshing search indexes upon - * BigQuery table columns. Reservations with this job type - * take priority over a default BACKGROUND reservation assignment (if it - * exists). - * - * Generated from protobuf enum BACKGROUND_SEARCH_INDEX_REFRESH = 9; - */ - const BACKGROUND_SEARCH_INDEX_REFRESH = 9; - - private static $valueToName = [ - self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', - self::PIPELINE => 'PIPELINE', - self::QUERY => 'QUERY', - self::ML_EXTERNAL => 'ML_EXTERNAL', - self::BACKGROUND => 'BACKGROUND', - self::CONTINUOUS => 'CONTINUOUS', - self::BACKGROUND_CHANGE_DATA_CAPTURE => 'BACKGROUND_CHANGE_DATA_CAPTURE', - self::BACKGROUND_COLUMN_METADATA_INDEX => 'BACKGROUND_COLUMN_METADATA_INDEX', - self::BACKGROUND_SEARCH_INDEX_REFRESH => 'BACKGROUND_SEARCH_INDEX_REFRESH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Assignment/State.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php deleted file mode 100644 index 3c09d6d11139..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Assignment/State.php +++ /dev/null @@ -1,64 +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); - } -} - 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 cfc2b5269b1d..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 -{ - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - */ - 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; - /** - * Optional. Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $size = 0; - /** - * Optional. Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $preferred_tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. 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 - * Optional. Size of a reservation, in bytes. - * @type \Google\Cloud\BigQuery\Reservation\V1\TableReference[] $preferred_tables - * Optional. Preferred tables to use BI capacity for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The 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; - } - - /** - * Optional. Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getSize() - { - return $this->size; - } - - /** - * Optional. Size of a reservation, in bytes. - * - * Generated from protobuf field int64 size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkInt64($var); - $this->size = $var; - - return $this; - } - - /** - * Optional. Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\TableReference> - */ - public function getPreferredTables() - { - return $this->preferred_tables; - } - - /** - * Optional. Preferred tables to use BI capacity for. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.TableReference preferred_tables = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Reservation\V1\TableReference[] $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 424d552bf299..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment.php +++ /dev/null @@ -1,535 +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 = ''; - /** - * Optional. Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $slot_count = 0; - /** - * Optional. Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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. Note after the commitment is renewed, - * commitment_start_time won't be changed. It refers to the start time of the - * original commitment. - * - * 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. Note after renewal, - * commitment_end_time is the time the renewed commitment expires. So itwould - * be at a time after commitment_start_time + committed period, because we - * don't change commitment_start_time , - * - * 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; - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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 [deprecated = true]; - * @deprecated - */ - protected $multi_region_auxiliary = false; - /** - * Optional. Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $edition = 0; - /** - * Output only. If true, the commitment is a flat-rate commitment, otherwise, - * it's an edition commitment. - * - * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_flat_rate = false; - - /** - * 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 - * Optional. Number of slots in this commitment. - * @type int $plan - * Optional. 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. Note after the commitment is renewed, - * commitment_start_time won't be changed. It refers to the start time of the - * original commitment. - * @type \Google\Protobuf\Timestamp $commitment_end_time - * Output only. The end of the current commitment period. It is applicable - * only for ACTIVE capacity commitments. Note after renewal, - * commitment_end_time is the time the renewed commitment expires. So itwould - * be at a time after commitment_start_time + committed period, because we - * don't change commitment_start_time , - * @type \Google\Rpc\Status $failure_status - * Output only. For FAILED commitment plan, provides the reason of failure. - * @type int $renewal_plan - * Optional. 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 - * Optional. Edition of the capacity commitment. - * @type bool $is_flat_rate - * Output only. If true, the commitment is a flat-rate commitment, otherwise, - * it's an edition 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; - } - - /** - * Optional. Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getSlotCount() - { - return $this->slot_count; - } - - /** - * Optional. Number of slots in this commitment. - * - * Generated from protobuf field int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setSlotCount($var) - { - GPBUtil::checkInt64($var); - $this->slot_count = $var; - - return $this; - } - - /** - * Optional. Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPlan() - { - return $this->plan; - } - - /** - * Optional. Capacity commitment commitment plan. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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. Note after the commitment is renewed, - * commitment_start_time won't be changed. It refers to the start time of the - * original commitment. - * - * 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. Note after the commitment is renewed, - * commitment_start_time won't be changed. It refers to the start time of the - * original commitment. - * - * 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. Note after renewal, - * commitment_end_time is the time the renewed commitment expires. So itwould - * be at a time after commitment_start_time + committed period, because we - * don't change commitment_start_time , - * - * 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. Note after renewal, - * commitment_end_time is the time the renewed commitment expires. So itwould - * be at a time after commitment_start_time + committed period, because we - * don't change commitment_start_time , - * - * 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; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRenewalPlan() - { - return $this->renewal_plan; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @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 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getMultiRegionAuxiliary() - { - if ($this->multi_region_auxiliary !== false) { - @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); - } - 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 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setMultiRegionAuxiliary($var) - { - @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->multi_region_auxiliary = $var; - - return $this; - } - - /** - * Optional. Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEdition() - { - return $this->edition; - } - - /** - * Optional. Edition of the capacity commitment. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); - $this->edition = $var; - - return $this; - } - - /** - * Output only. If true, the commitment is a flat-rate commitment, otherwise, - * it's an edition commitment. - * - * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsFlatRate() - { - return $this->is_flat_rate; - } - - /** - * Output only. If true, the commitment is a flat-rate commitment, otherwise, - * it's an edition commitment. - * - * Generated from protobuf field bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsFlatRate($var) - { - GPBUtil::checkBool($var); - $this->is_flat_rate = $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 1ab5419487d7..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/CommitmentPlan.php +++ /dev/null @@ -1,131 +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 [deprecated = true]; - */ - 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); - } -} - 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 7292ff08a50a..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CapacityCommitment/State.php +++ /dev/null @@ -1,71 +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); - } -} - 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 52082ac349e1..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 aec09e340bc0..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/CreateReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationGroupRequest.php deleted file mode 100644 index ed6c26e5f132..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/CreateReservationGroupRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest - */ -class CreateReservationGroupRequest 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 = ''; - /** - * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reservation_group_id = ''; - /** - * Required. New Reservation Group to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reservation_group = null; - - /** - * 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_group_id - * Required. The reservation group 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\ReservationGroup $reservation_group - * Required. New Reservation Group 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; - } - - /** - * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReservationGroupId() - { - return $this->reservation_group_id; - } - - /** - * Required. The reservation group 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_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReservationGroupId($var) - { - GPBUtil::checkString($var, True); - $this->reservation_group_id = $var; - - return $this; - } - - /** - * Required. New Reservation Group to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup|null - */ - public function getReservationGroup() - { - return $this->reservation_group; - } - - public function hasReservationGroup() - { - return isset($this->reservation_group); - } - - public function clearReservationGroup() - { - unset($this->reservation_group); - } - - /** - * Required. New Reservation Group to create. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup $var - * @return $this - */ - public function setReservationGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup::class); - $this->reservation_group = $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 454b5b6fc28c..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 26e2a7ef80f7..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 fac3cc1e58eb..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/DeleteReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationGroupRequest.php deleted file mode 100644 index 0f9365d1bc12..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationGroupRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest - */ -class DeleteReservationGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the reservation group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/team1-prod` - * Please see {@see ReservationServiceClient::reservationGroupName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\DeleteReservationGroupRequest - * - * @experimental - */ - public static function 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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/team1-prod` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the reservation group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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/DeleteReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/DeleteReservationRequest.php deleted file mode 100644 index 579afd9bc271..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 aeb6f5a1d84e..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/FailoverMode.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverMode.php deleted file mode 100644 index 21659c71dda1..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.reservation.v1.FailoverMode - */ -class FailoverMode -{ - /** - * Invalid value. - * - * Generated from protobuf enum FAILOVER_MODE_UNSPECIFIED = 0; - */ - const FAILOVER_MODE_UNSPECIFIED = 0; - /** - * When customers initiate a soft failover, BigQuery will wait until all - * committed writes are replicated to the secondary. This mode requires both - * regions to be available for the failover to succeed and prevents data loss. - * - * Generated from protobuf enum SOFT = 1; - */ - const SOFT = 1; - /** - * When customers initiate a hard failover, BigQuery will not wait until all - * committed writes are replicated to the secondary. There can be data loss - * for hard failover. - * - * Generated from protobuf enum HARD = 2; - */ - const HARD = 2; - - private static $valueToName = [ - self::FAILOVER_MODE_UNSPECIFIED => 'FAILOVER_MODE_UNSPECIFIED', - self::SOFT => 'SOFT', - self::HARD => 'HARD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/FailoverReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.php deleted file mode 100644 index 541249d1eeab..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/FailoverReservationRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.bigquery.reservation.v1.FailoverReservationRequest - */ -class FailoverReservationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the reservation to failover. 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 = ''; - /** - * Optional. A parameter that determines how writes that are pending - * replication are handled after a failover is initiated. If not specified, - * HARD failover mode is used by default. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $failover_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the reservation to failover. E.g., - * `projects/myproject/locations/US/reservations/team1-prod` - * @type int $failover_mode - * Optional. A parameter that determines how writes that are pending - * replication are handled after a failover is initiated. If not specified, - * HARD failover mode is used by default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the reservation to failover. 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 failover. 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; - } - - /** - * Optional. A parameter that determines how writes that are pending - * replication are handled after a failover is initiated. If not specified, - * HARD failover mode is used by default. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFailoverMode() - { - return $this->failover_mode; - } - - /** - * Optional. A parameter that determines how writes that are pending - * replication are handled after a failover is initiated. If not specified, - * HARD failover mode is used by default. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.FailoverMode failover_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFailoverMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\FailoverMode::class); - $this->failover_mode = $var; - - return $this; - } - -} - 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 55f4d6c87f4d..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 9417442a84fe..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/GetReservationGroupRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationGroupRequest.php deleted file mode 100644 index 81dbd2098580..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationGroupRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.bigquery.reservation.v1.GetReservationGroupRequest - */ -class GetReservationGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the reservation group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/team1-prod` - * Please see {@see ReservationServiceClient::reservationGroupName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Reservation\V1\GetReservationGroupRequest - * - * @experimental - */ - public static function 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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/team1-prod` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the reservation group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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 group to retrieve. E.g., - * `projects/myproject/locations/US/reservationGroups/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/GetReservationRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/GetReservationRequest.php deleted file mode 100644 index ccf51f8d429a..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 071ac53ab516..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 fa098ef78425..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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> - */ - 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 df66845c159f..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 e6a36ff0f7ac..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 \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment> - */ - 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 \Google\Cloud\BigQuery\Reservation\V1\CapacityCommitment[] $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/ListReservationGroupsRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsRequest.php deleted file mode 100644 index 7021d28e43d5..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest - */ -class ListReservationGroupsRequest 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\ListReservationGroupsRequest - * - * @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/ListReservationGroupsResponse.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.php deleted file mode 100644 index ef647a78dd9b..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ListReservationGroupsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse - */ -class ListReservationGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of reservations visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_groups = 1; - */ - private $reservation_groups; - /** - * 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 \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup[] $reservation_groups - * 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.ReservationGroup reservation_groups = 1; - * @return RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\ReservationGroup> - */ - public function getReservationGroups() - { - return $this->reservation_groups; - } - - /** - * List of reservations visible to the user. - * - * Generated from protobuf field repeated .google.cloud.bigquery.reservation.v1.ReservationGroup reservation_groups = 1; - * @param \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup[] $var - * @return $this - */ - public function setReservationGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Reservation\V1\ReservationGroup::class); - $this->reservation_groups = $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 aac5c31b3e19..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 07341619c430..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 \Google\Cloud\BigQuery\Reservation\V1\Reservation[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Reservation> - */ - 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 \Google\Cloud\BigQuery\Reservation\V1\Reservation[] $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 a76cf6670f10..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MergeCapacityCommitmentsRequest.php +++ /dev/null @@ -1,188 +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; - /** - * Optional. The optional resulting 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. - * - * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $capacity_commitment_id = ''; - - /** - * @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 string[] $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 - * @type string $capacity_commitment_id - * Optional. The optional resulting 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. - * } - */ - 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 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 string[] $var - * @return $this - */ - public function setCapacityCommitmentIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->capacity_commitment_ids = $arr; - - return $this; - } - - /** - * Optional. The optional resulting 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. - * - * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCapacityCommitmentId() - { - return $this->capacity_commitment_id; - } - - /** - * Optional. The optional resulting 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. - * - * Generated from protobuf field string capacity_commitment_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/MoveAssignmentRequest.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/MoveAssignmentRequest.php deleted file mode 100644 index 370f5b95e94f..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 44716e51738c..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation.php +++ /dev/null @@ -1,1084 +0,0 @@ -google.cloud.bigquery.reservation.v1.Reservation - */ -class Reservation extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Baseline 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, or autoscaling is enabled. - * The total slot_capacity of the reservation and its siblings - * may exceed the total slot_count of capacity commitments. In that case, the - * exceeding slots will be charged with the autoscale SKU. You can increase - * the number of baseline slots in a reservation every few minutes. If you - * want to decrease your baseline slots, you are limited to once an hour if - * you have recently changed your baseline slot capacity and your baseline - * slots exceed your committed slots. Otherwise, you can decrease your - * baseline slots every few minutes. - * - * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $slot_capacity = 0; - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_idle_slots = false; - /** - * Optional. The configuration parameters for the auto scaling feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscale = null; - /** - * Optional. 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 BigQuery CLI. - * - * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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 [deprecated = true]; - * @deprecated - */ - protected $multi_region_auxiliary = false; - /** - * Optional. Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $edition = 0; - /** - * Output only. The current location of the reservation's primary replica. - * This field is only set for reservations using the managed disaster recovery - * feature. - * - * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $primary_location = ''; - /** - * Optional. The current location of the reservation's secondary replica. This - * field is only set for reservations using the managed disaster recovery - * feature. Users can set this in create reservation calls - * to create a failover reservation or in update reservation calls to convert - * a non-failover reservation to a failover reservation(or vice versa). - * - * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $secondary_location = ''; - /** - * Output only. The location where the reservation was originally created. - * This is set only during the failover reservation's creation. All billing - * charges for the failover reservation will be applied to this location. - * - * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $original_primary_location = ''; - /** - * Optional. The overall max slots for the reservation, covering slot_capacity - * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - * If present, the reservation won't use more than the specified number of - * slots, even if there is demand and supply (from idle slots). - * NOTE: capping a reservation's idle slot usage is best effort and its - * usage may exceed the max_slots value. However, in terms of - * autoscale.current_slots (which accounts for the additional added slots), it - * will never exceed the max_slots - baseline. - * This field must be set together with the scaling_mode enum value, - * otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * If the max_slots and scaling_mode are set, the autoscale or - * autoscale.max_slots field must be unset. Otherwise the request will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - * autoscale field may still be in the output. The autopscale.max_slots will - * always show as 0 and the autoscaler.current_slots will represent the - * current slots from autoscaler excluding idle slots. - * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - * then in the output, the autoscaler.max_slots will be 0 and the - * autoscaler.current_slots may be any value between 0 and 1000. - * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - * and idle slots usage is 200, then in the output, the autoscaler.max_slots - * will be 0 and the autoscaler.current_slots will not be higher than 700. - * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - * output, the autoscaler field will be null. - * If the max_slots and scaling_mode are set, then the ignore_idle_slots field - * must be aligned with the scaling_mode enum value.(See details in - * ScalingMode comments). Otherwise the request will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note, the max_slots is for user to manage the part of slots greater - * than the baseline. Therefore, we don't allow users to set max_slots smaller - * or equal to the baseline as it will not be meaningful. If the field is - * present and slot_capacity>=max_slots, requests will be rejected with error - * code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note that if max_slots is set to 0, we will treat it as unset. - * Customers can set max_slots to 0 and set scaling_mode to - * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - * - * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_slots = null; - /** - * Optional. The scaling mode for the reservation. - * If the field is present but max_slots is not present, requests will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scaling_mode = 0; - /** - * Optional. The labels associated with this reservation. You can use these - * to organize and group your reservations. - * You can set this property when you create or update a reservation. - * - * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The reservation group that this reservation belongs to. - * You can set this property when you create or update a reservation. - * Reservations do not need to belong to a reservation group. - * Format: - * projects/{project}/locations/{location}/reservationGroups/{reservation_group} - * or just {reservation_group} - * - * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reservation_group = ''; - /** - * Output only. The Disaster Recovery(DR) replication status of the - * reservation. This is only available for the primary replicas of DR/failover - * reservations and provides information about the both the staleness of the - * secondary and the last error encountered while trying to replicate changes - * from the primary to the secondary. If this field is blank, it means that - * the reservation is either not a DR reservation or the reservation is a DR - * secondary or that any replication operations on the reservation have - * succeeded. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $replication_status = null; - /** - * Optional. The scheduling policy to use for jobs and queries running under - * this reservation. The scheduling policy controls how the reservation's - * resources are distributed. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduling_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. 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 - * Optional. Baseline 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, or autoscaling is enabled. - * The total slot_capacity of the reservation and its siblings - * may exceed the total slot_count of capacity commitments. In that case, the - * exceeding slots will be charged with the autoscale SKU. You can increase - * the number of baseline slots in a reservation every few minutes. If you - * want to decrease your baseline slots, you are limited to once an hour if - * you have recently changed your baseline slot capacity and your baseline - * slots exceed your committed slots. Otherwise, you can decrease your - * baseline slots every few minutes. - * @type bool $ignore_idle_slots - * Optional. 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 - * Optional. The configuration parameters for the auto scaling feature. - * @type int|string $concurrency - * Optional. 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 BigQuery 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 - * Optional. Edition of the reservation. - * @type string $primary_location - * Output only. The current location of the reservation's primary replica. - * This field is only set for reservations using the managed disaster recovery - * feature. - * @type string $secondary_location - * Optional. The current location of the reservation's secondary replica. This - * field is only set for reservations using the managed disaster recovery - * feature. Users can set this in create reservation calls - * to create a failover reservation or in update reservation calls to convert - * a non-failover reservation to a failover reservation(or vice versa). - * @type string $original_primary_location - * Output only. The location where the reservation was originally created. - * This is set only during the failover reservation's creation. All billing - * charges for the failover reservation will be applied to this location. - * @type int|string $max_slots - * Optional. The overall max slots for the reservation, covering slot_capacity - * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - * If present, the reservation won't use more than the specified number of - * slots, even if there is demand and supply (from idle slots). - * NOTE: capping a reservation's idle slot usage is best effort and its - * usage may exceed the max_slots value. However, in terms of - * autoscale.current_slots (which accounts for the additional added slots), it - * will never exceed the max_slots - baseline. - * This field must be set together with the scaling_mode enum value, - * otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * If the max_slots and scaling_mode are set, the autoscale or - * autoscale.max_slots field must be unset. Otherwise the request will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - * autoscale field may still be in the output. The autopscale.max_slots will - * always show as 0 and the autoscaler.current_slots will represent the - * current slots from autoscaler excluding idle slots. - * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - * then in the output, the autoscaler.max_slots will be 0 and the - * autoscaler.current_slots may be any value between 0 and 1000. - * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - * and idle slots usage is 200, then in the output, the autoscaler.max_slots - * will be 0 and the autoscaler.current_slots will not be higher than 700. - * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - * output, the autoscaler field will be null. - * If the max_slots and scaling_mode are set, then the ignore_idle_slots field - * must be aligned with the scaling_mode enum value.(See details in - * ScalingMode comments). Otherwise the request will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note, the max_slots is for user to manage the part of slots greater - * than the baseline. Therefore, we don't allow users to set max_slots smaller - * or equal to the baseline as it will not be meaningful. If the field is - * present and slot_capacity>=max_slots, requests will be rejected with error - * code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note that if max_slots is set to 0, we will treat it as unset. - * Customers can set max_slots to 0 and set scaling_mode to - * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - * @type int $scaling_mode - * Optional. The scaling mode for the reservation. - * If the field is present but max_slots is not present, requests will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels associated with this reservation. You can use these - * to organize and group your reservations. - * You can set this property when you create or update a reservation. - * @type string $reservation_group - * Optional. The reservation group that this reservation belongs to. - * You can set this property when you create or update a reservation. - * Reservations do not need to belong to a reservation group. - * Format: - * projects/{project}/locations/{location}/reservationGroups/{reservation_group} - * or just {reservation_group} - * @type \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus $replication_status - * Output only. The Disaster Recovery(DR) replication status of the - * reservation. This is only available for the primary replicas of DR/failover - * reservations and provides information about the both the staleness of the - * secondary and the last error encountered while trying to replicate changes - * from the primary to the secondary. If this field is blank, it means that - * the reservation is either not a DR reservation or the reservation is a DR - * secondary or that any replication operations on the reservation have - * succeeded. - * @type \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $scheduling_policy - * Optional. The scheduling policy to use for jobs and queries running under - * this reservation. The scheduling policy controls how the reservation's - * resources are distributed. - * This feature is not yet generally available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Baseline 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, or autoscaling is enabled. - * The total slot_capacity of the reservation and its siblings - * may exceed the total slot_count of capacity commitments. In that case, the - * exceeding slots will be charged with the autoscale SKU. You can increase - * the number of baseline slots in a reservation every few minutes. If you - * want to decrease your baseline slots, you are limited to once an hour if - * you have recently changed your baseline slot capacity and your baseline - * slots exceed your committed slots. Otherwise, you can decrease your - * baseline slots every few minutes. - * - * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getSlotCapacity() - { - return $this->slot_capacity; - } - - /** - * Optional. Baseline 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, or autoscaling is enabled. - * The total slot_capacity of the reservation and its siblings - * may exceed the total slot_count of capacity commitments. In that case, the - * exceeding slots will be charged with the autoscale SKU. You can increase - * the number of baseline slots in a reservation every few minutes. If you - * want to decrease your baseline slots, you are limited to once an hour if - * you have recently changed your baseline slot capacity and your baseline - * slots exceed your committed slots. Otherwise, you can decrease your - * baseline slots every few minutes. - * - * Generated from protobuf field int64 slot_capacity = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setSlotCapacity($var) - { - GPBUtil::checkInt64($var); - $this->slot_capacity = $var; - - return $this; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreIdleSlots() - { - return $this->ignore_idle_slots; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreIdleSlots($var) - { - GPBUtil::checkBool($var); - $this->ignore_idle_slots = $var; - - return $this; - } - - /** - * Optional. The configuration parameters for the auto scaling feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The configuration parameters for the auto scaling feature. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. 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 BigQuery CLI. - * - * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getConcurrency() - { - return $this->concurrency; - } - - /** - * Optional. 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 BigQuery CLI. - * - * Generated from protobuf field int64 concurrency = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @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 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getMultiRegionAuxiliary() - { - if ($this->multi_region_auxiliary !== false) { - @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); - } - 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 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setMultiRegionAuxiliary($var) - { - @trigger_error('multi_region_auxiliary is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->multi_region_auxiliary = $var; - - return $this; - } - - /** - * Optional. Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEdition() - { - return $this->edition; - } - - /** - * Optional. Edition of the reservation. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Edition edition = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Edition::class); - $this->edition = $var; - - return $this; - } - - /** - * Output only. The current location of the reservation's primary replica. - * This field is only set for reservations using the managed disaster recovery - * feature. - * - * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getPrimaryLocation() - { - return $this->primary_location; - } - - /** - * Output only. The current location of the reservation's primary replica. - * This field is only set for reservations using the managed disaster recovery - * feature. - * - * Generated from protobuf field string primary_location = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrimaryLocation($var) - { - GPBUtil::checkString($var, True); - $this->primary_location = $var; - - return $this; - } - - /** - * Optional. The current location of the reservation's secondary replica. This - * field is only set for reservations using the managed disaster recovery - * feature. Users can set this in create reservation calls - * to create a failover reservation or in update reservation calls to convert - * a non-failover reservation to a failover reservation(or vice versa). - * - * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getSecondaryLocation() - { - return $this->secondary_location; - } - - /** - * Optional. The current location of the reservation's secondary replica. This - * field is only set for reservations using the managed disaster recovery - * feature. Users can set this in create reservation calls - * to create a failover reservation or in update reservation calls to convert - * a non-failover reservation to a failover reservation(or vice versa). - * - * Generated from protobuf field string secondary_location = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecondaryLocation($var) - { - GPBUtil::checkString($var, True); - $this->secondary_location = $var; - - return $this; - } - - /** - * Output only. The location where the reservation was originally created. - * This is set only during the failover reservation's creation. All billing - * charges for the failover reservation will be applied to this location. - * - * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getOriginalPrimaryLocation() - { - return $this->original_primary_location; - } - - /** - * Output only. The location where the reservation was originally created. - * This is set only during the failover reservation's creation. All billing - * charges for the failover reservation will be applied to this location. - * - * Generated from protobuf field string original_primary_location = 20 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOriginalPrimaryLocation($var) - { - GPBUtil::checkString($var, True); - $this->original_primary_location = $var; - - return $this; - } - - /** - * Optional. The overall max slots for the reservation, covering slot_capacity - * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - * If present, the reservation won't use more than the specified number of - * slots, even if there is demand and supply (from idle slots). - * NOTE: capping a reservation's idle slot usage is best effort and its - * usage may exceed the max_slots value. However, in terms of - * autoscale.current_slots (which accounts for the additional added slots), it - * will never exceed the max_slots - baseline. - * This field must be set together with the scaling_mode enum value, - * otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * If the max_slots and scaling_mode are set, the autoscale or - * autoscale.max_slots field must be unset. Otherwise the request will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - * autoscale field may still be in the output. The autopscale.max_slots will - * always show as 0 and the autoscaler.current_slots will represent the - * current slots from autoscaler excluding idle slots. - * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - * then in the output, the autoscaler.max_slots will be 0 and the - * autoscaler.current_slots may be any value between 0 and 1000. - * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - * and idle slots usage is 200, then in the output, the autoscaler.max_slots - * will be 0 and the autoscaler.current_slots will not be higher than 700. - * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - * output, the autoscaler field will be null. - * If the max_slots and scaling_mode are set, then the ignore_idle_slots field - * must be aligned with the scaling_mode enum value.(See details in - * ScalingMode comments). Otherwise the request will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note, the max_slots is for user to manage the part of slots greater - * than the baseline. Therefore, we don't allow users to set max_slots smaller - * or equal to the baseline as it will not be meaningful. If the field is - * present and slot_capacity>=max_slots, requests will be rejected with error - * code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note that if max_slots is set to 0, we will treat it as unset. - * Customers can set max_slots to 0 and set scaling_mode to - * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - * - * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMaxSlots() - { - return isset($this->max_slots) ? $this->max_slots : 0; - } - - public function hasMaxSlots() - { - return isset($this->max_slots); - } - - public function clearMaxSlots() - { - unset($this->max_slots); - } - - /** - * Optional. The overall max slots for the reservation, covering slot_capacity - * (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - * If present, the reservation won't use more than the specified number of - * slots, even if there is demand and supply (from idle slots). - * NOTE: capping a reservation's idle slot usage is best effort and its - * usage may exceed the max_slots value. However, in terms of - * autoscale.current_slots (which accounts for the additional added slots), it - * will never exceed the max_slots - baseline. - * This field must be set together with the scaling_mode enum value, - * otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * If the max_slots and scaling_mode are set, the autoscale or - * autoscale.max_slots field must be unset. Otherwise the request will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - * autoscale field may still be in the output. The autopscale.max_slots will - * always show as 0 and the autoscaler.current_slots will represent the - * current slots from autoscaler excluding idle slots. - * For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - * then in the output, the autoscaler.max_slots will be 0 and the - * autoscaler.current_slots may be any value between 0 and 1000. - * If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - * and idle slots usage is 200, then in the output, the autoscaler.max_slots - * will be 0 and the autoscaler.current_slots will not be higher than 700. - * If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - * output, the autoscaler field will be null. - * If the max_slots and scaling_mode are set, then the ignore_idle_slots field - * must be aligned with the scaling_mode enum value.(See details in - * ScalingMode comments). Otherwise the request will be rejected with - * error code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note, the max_slots is for user to manage the part of slots greater - * than the baseline. Therefore, we don't allow users to set max_slots smaller - * or equal to the baseline as it will not be meaningful. If the field is - * present and slot_capacity>=max_slots, requests will be rejected with error - * code `google.rpc.Code.INVALID_ARGUMENT`. - * Please note that if max_slots is set to 0, we will treat it as unset. - * Customers can set max_slots to 0 and set scaling_mode to - * SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - * - * Generated from protobuf field optional int64 max_slots = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMaxSlots($var) - { - GPBUtil::checkInt64($var); - $this->max_slots = $var; - - return $this; - } - - /** - * Optional. The scaling mode for the reservation. - * If the field is present but max_slots is not present, requests will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getScalingMode() - { - return $this->scaling_mode; - } - - /** - * Optional. The scaling mode for the reservation. - * If the field is present but max_slots is not present, requests will be - * rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ScalingMode scaling_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setScalingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\ScalingMode::class); - $this->scaling_mode = $var; - - return $this; - } - - /** - * Optional. The labels associated with this reservation. You can use these - * to organize and group your reservations. - * You can set this property when you create or update a reservation. - * - * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels associated with this reservation. You can use these - * to organize and group your reservations. - * You can set this property when you create or update a reservation. - * - * Generated from protobuf field map labels = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The reservation group that this reservation belongs to. - * You can set this property when you create or update a reservation. - * Reservations do not need to belong to a reservation group. - * Format: - * projects/{project}/locations/{location}/reservationGroups/{reservation_group} - * or just {reservation_group} - * - * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReservationGroup() - { - return $this->reservation_group; - } - - /** - * Optional. The reservation group that this reservation belongs to. - * You can set this property when you create or update a reservation. - * Reservations do not need to belong to a reservation group. - * Format: - * projects/{project}/locations/{location}/reservationGroups/{reservation_group} - * or just {reservation_group} - * - * Generated from protobuf field string reservation_group = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReservationGroup($var) - { - GPBUtil::checkString($var, True); - $this->reservation_group = $var; - - return $this; - } - - /** - * Output only. The Disaster Recovery(DR) replication status of the - * reservation. This is only available for the primary replicas of DR/failover - * reservations and provides information about the both the staleness of the - * secondary and the last error encountered while trying to replicate changes - * from the primary to the secondary. If this field is blank, it means that - * the reservation is either not a DR reservation or the reservation is a DR - * secondary or that any replication operations on the reservation have - * succeeded. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus|null - */ - public function getReplicationStatus() - { - return $this->replication_status; - } - - public function hasReplicationStatus() - { - return isset($this->replication_status); - } - - public function clearReplicationStatus() - { - unset($this->replication_status); - } - - /** - * Output only. The Disaster Recovery(DR) replication status of the - * reservation. This is only available for the primary replicas of DR/failover - * reservations and provides information about the both the staleness of the - * secondary and the last error encountered while trying to replicate changes - * from the primary to the secondary. If this field is blank, it means that - * the reservation is either not a DR reservation or the reservation is a DR - * secondary or that any replication operations on the reservation have - * succeeded. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus replication_status = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus $var - * @return $this - */ - public function setReplicationStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\Reservation\ReplicationStatus::class); - $this->replication_status = $var; - - return $this; - } - - /** - * Optional. The scheduling policy to use for jobs and queries running under - * this reservation. The scheduling policy controls how the reservation's - * resources are distributed. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy|null - */ - public function getSchedulingPolicy() - { - return $this->scheduling_policy; - } - - public function hasSchedulingPolicy() - { - return isset($this->scheduling_policy); - } - - public function clearSchedulingPolicy() - { - unset($this->scheduling_policy); - } - - /** - * Optional. The scheduling policy to use for jobs and queries running under - * this reservation. The scheduling policy controls how the reservation's - * resources are distributed. - * This feature is not yet generally available. - * - * Generated from protobuf field .google.cloud.bigquery.reservation.v1.SchedulingPolicy scheduling_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy $var - * @return $this - */ - public function setSchedulingPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Reservation\V1\SchedulingPolicy::class); - $this->scheduling_policy = $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 7cf3ed324dda..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/Autoscale.php +++ /dev/null @@ -1,117 +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]. Note: after users reduce - * max_slots, it may take a while before it can be propagated, so - * current_slots may stay in the original value and could be larger than - * max_slots for that brief period (less than one minute) - * - * Generated from protobuf field int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $current_slots = 0; - /** - * Optional. Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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]. Note: after users reduce - * max_slots, it may take a while before it can be propagated, so - * current_slots may stay in the original value and could be larger than - * max_slots for that brief period (less than one minute) - * @type int|string $max_slots - * Optional. 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]. Note: after users reduce - * max_slots, it may take a while before it can be propagated, so - * current_slots may stay in the original value and could be larger than - * max_slots for that brief period (less than one minute) - * - * 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]. Note: after users reduce - * max_slots, it may take a while before it can be propagated, so - * current_slots may stay in the original value and could be larger than - * max_slots for that brief period (less than one minute) - * - * 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; - } - - /** - * Optional. Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMaxSlots() - { - return $this->max_slots; - } - - /** - * Optional. Number of slots to be scaled when needed. - * - * Generated from protobuf field int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMaxSlots($var) - { - GPBUtil::checkInt64($var); - $this->max_slots = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php deleted file mode 100644 index 013d9c7e0af4..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ReplicationStatus.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus - */ -class ReplicationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The last error encountered while trying to replicate changes - * from the primary to the secondary. This field is only available if the - * replication has not succeeded since. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The time at which the last error was encountered while - * trying to replicate changes from the primary to the secondary. This field - * is only available if the replication has not succeeded since. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_error_time = null; - /** - * Output only. A timestamp corresponding to the last change on the primary - * that was successfully replicated to the secondary. - * - * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_replication_time = null; - /** - * Output only. The time at which a soft failover for the reservation and - * its associated datasets was initiated. After this field is set, all - * subsequent changes to the reservation will be rejected unless a hard - * failover overrides this operation. This field will be cleared once the - * failover is complete. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $soft_failover_start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $error - * Output only. The last error encountered while trying to replicate changes - * from the primary to the secondary. This field is only available if the - * replication has not succeeded since. - * @type \Google\Protobuf\Timestamp $last_error_time - * Output only. The time at which the last error was encountered while - * trying to replicate changes from the primary to the secondary. This field - * is only available if the replication has not succeeded since. - * @type \Google\Protobuf\Timestamp $last_replication_time - * Output only. A timestamp corresponding to the last change on the primary - * that was successfully replicated to the secondary. - * @type \Google\Protobuf\Timestamp $soft_failover_start_time - * Output only. The time at which a soft failover for the reservation and - * its associated datasets was initiated. After this field is set, all - * subsequent changes to the reservation will be rejected unless a hard - * failover overrides this operation. This field will be cleared once the - * failover is complete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The last error encountered while trying to replicate changes - * from the primary to the secondary. This field is only available if the - * replication has not succeeded since. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.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. The last error encountered while trying to replicate changes - * from the primary to the secondary. This field is only available if the - * replication has not succeeded since. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.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; - } - - /** - * Output only. The time at which the last error was encountered while - * trying to replicate changes from the primary to the secondary. This field - * is only available if the replication has not succeeded since. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastErrorTime() - { - return $this->last_error_time; - } - - public function hasLastErrorTime() - { - return isset($this->last_error_time); - } - - public function clearLastErrorTime() - { - unset($this->last_error_time); - } - - /** - * Output only. The time at which the last error was encountered while - * trying to replicate changes from the primary to the secondary. This field - * is only available if the replication has not succeeded since. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastErrorTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_error_time = $var; - - return $this; - } - - /** - * Output only. A timestamp corresponding to the last change on the primary - * that was successfully replicated to the secondary. - * - * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastReplicationTime() - { - return $this->last_replication_time; - } - - public function hasLastReplicationTime() - { - return isset($this->last_replication_time); - } - - public function clearLastReplicationTime() - { - unset($this->last_replication_time); - } - - /** - * Output only. A timestamp corresponding to the last change on the primary - * that was successfully replicated to the secondary. - * - * Generated from protobuf field .google.protobuf.Timestamp last_replication_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastReplicationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_replication_time = $var; - - return $this; - } - - /** - * Output only. The time at which a soft failover for the reservation and - * its associated datasets was initiated. After this field is set, all - * subsequent changes to the reservation will be rejected unless a hard - * failover overrides this operation. This field will be cleared once the - * failover is complete. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftFailoverStartTime() - { - return $this->soft_failover_start_time; - } - - public function hasSoftFailoverStartTime() - { - return isset($this->soft_failover_start_time); - } - - public function clearSoftFailoverStartTime() - { - unset($this->soft_failover_start_time); - } - - /** - * Output only. The time at which a soft failover for the reservation and - * its associated datasets was initiated. After this field is set, all - * subsequent changes to the reservation will be rejected unless a hard - * failover overrides this operation. This field will be cleared once the - * failover is complete. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_failover_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftFailoverStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_failover_start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php deleted file mode 100644 index 71693a7f4844..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/Reservation/ScalingMode.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.reservation.v1.Reservation.ScalingMode - */ -class ScalingMode -{ - /** - * Default value of ScalingMode. - * - * Generated from protobuf enum SCALING_MODE_UNSPECIFIED = 0; - */ - const SCALING_MODE_UNSPECIFIED = 0; - /** - * The reservation will scale up only using slots from autoscaling. It will - * not use any idle slots even if there may be some available. The upper - * limit that autoscaling can scale up to will be max_slots - baseline. - * For example, if max_slots is 1000, baseline is 200 and customer sets - * ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 - * slots and no idle slots will be used. - * Please note, in this mode, the ignore_idle_slots field must be set to - * true. Otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf enum AUTOSCALE_ONLY = 1; - */ - const AUTOSCALE_ONLY = 1; - /** - * The reservation will scale up using only idle slots contributed by - * other reservations or from unassigned commitments. If no idle slots are - * available it will not scale up further. If the idle slots which it is - * using are reclaimed by the contributing reservation(s) it may be forced - * to scale down. The max idle slots the reservation can be max_slots - - * baseline capacity. For example, if max_slots is 1000, baseline is 200 and - * customer sets ScalingMode to IDLE_SLOTS_ONLY, - * 1. if there are 1000 idle slots available in other reservations, the - * reservation will scale up to 1000 slots with 200 baseline and 800 idle - * slots. - * 2. if there are 500 idle slots available in other reservations, the - * reservation will scale up to 700 slots with 200 baseline and 500 idle - * slots. - * Please note, in this mode, the reservation might not be able to scale up - * to max_slots. - * Please note, in this mode, the ignore_idle_slots field must be set to - * false. Otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf enum IDLE_SLOTS_ONLY = 2; - */ - const IDLE_SLOTS_ONLY = 2; - /** - * The reservation will scale up using all slots available to it. It will - * use idle slots contributed by other reservations or from unassigned - * commitments first. If no idle slots are available it will scale up using - * autoscaling. For example, if max_slots is 1000, baseline is 200 and - * customer sets ScalingMode to ALL_SLOTS, - * 1. if there are 800 idle slots available in other reservations, the - * reservation will scale up to 1000 slots with 200 baseline and 800 idle - * slots. - * 2. if there are 500 idle slots available in other reservations, the - * reservation will scale up to 1000 slots with 200 baseline, 500 idle - * slots and 300 autoscaling slots. - * 3. if there are no idle slots available in other reservations, it will - * scale up to 1000 slots with 200 baseline and 800 autoscaling slots. - * Please note, in this mode, the ignore_idle_slots field must be set to - * false. Otherwise the request will be rejected with error code - * `google.rpc.Code.INVALID_ARGUMENT`. - * - * Generated from protobuf enum ALL_SLOTS = 3; - */ - const ALL_SLOTS = 3; - - private static $valueToName = [ - self::SCALING_MODE_UNSPECIFIED => 'SCALING_MODE_UNSPECIFIED', - self::AUTOSCALE_ONLY => 'AUTOSCALE_ONLY', - self::IDLE_SLOTS_ONLY => 'IDLE_SLOTS_ONLY', - self::ALL_SLOTS => 'ALL_SLOTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/ReservationGroup.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php deleted file mode 100644 index c33ac03c6149..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/ReservationGroup.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.bigquery.reservation.v1.ReservationGroup - */ -class ReservationGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the reservation group, e.g., - * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. - * The reservation_group_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) = IDENTIFIER]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the reservation group, e.g., - * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. - * The reservation_group_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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the reservation group, e.g., - * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. - * The reservation_group_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) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the reservation group, e.g., - * `projects/{@*}locations/{@*}reservationGroups/team1-prod`. - * The reservation_group_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) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php b/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php deleted file mode 100644 index d9d7023609bf..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/proto/src/Google/Cloud/BigQuery/Reservation/V1/SchedulingPolicy.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.bigquery.reservation.v1.SchedulingPolicy - */ -class SchedulingPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * concurrency of jobs running for any particular project within it to the - * given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $concurrency = null; - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * slot consumption of queries running for any particular project within it to - * the given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_slots = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $concurrency - * Optional. If present and > 0, the reservation will attempt to limit the - * concurrency of jobs running for any particular project within it to the - * given value. - * This feature is not yet generally available. - * @type int|string $max_slots - * Optional. If present and > 0, the reservation will attempt to limit the - * slot consumption of queries running for any particular project within it to - * the given value. - * This feature is not yet generally available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * concurrency of jobs running for any particular project within it to the - * given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getConcurrency() - { - return isset($this->concurrency) ? $this->concurrency : 0; - } - - public function hasConcurrency() - { - return isset($this->concurrency); - } - - public function clearConcurrency() - { - unset($this->concurrency); - } - - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * concurrency of jobs running for any particular project within it to the - * given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 concurrency = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setConcurrency($var) - { - GPBUtil::checkInt64($var); - $this->concurrency = $var; - - return $this; - } - - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * slot consumption of queries running for any particular project within it to - * the given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMaxSlots() - { - return isset($this->max_slots) ? $this->max_slots : 0; - } - - public function hasMaxSlots() - { - return isset($this->max_slots); - } - - public function clearMaxSlots() - { - unset($this->max_slots); - } - - /** - * Optional. If present and > 0, the reservation will attempt to limit the - * slot consumption of queries running for any particular project within it to - * the given value. - * This feature is not yet generally available. - * - * Generated from protobuf field optional int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMaxSlots($var) - { - GPBUtil::checkInt64($var); - $this->max_slots = $var; - - return $this; - } - -} - 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 f9f7236a3cc4..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 8cb9e34764d8..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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> - */ - 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 9a0c2badc32c..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 f7a8a0f377e2..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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 RepeatedField<\Google\Cloud\BigQuery\Reservation\V1\Assignment> - */ - 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 \Google\Cloud\BigQuery\Reservation\V1\Assignment[] $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 bdc3182f88ab..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 f8968ed298c2..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 a59de4654657..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 -{ - /** - * Optional. The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project_id = ''; - /** - * Optional. The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dataset_id = ''; - /** - * Optional. The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $table_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Optional. The assigned project ID of the project. - * @type string $dataset_id - * Optional. The ID of the dataset in the above project. - * @type string $table_id - * Optional. 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); - } - - /** - * Optional. The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Optional. The assigned project ID of the project. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Optional. The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Optional. The ID of the dataset in the above project. - * - * Generated from protobuf field string dataset_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - - /** - * Optional. The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Optional. The ID of the table in the above dataset. - * - * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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 8dfae6d03330..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 323b094e6e2b..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 39f34f5e455f..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 803b3b895a49..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 260aca84de56..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 348642c043d6..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 156bdb0ea5b5..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/create_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation_group.php deleted file mode 100644 index 34cb2dbd8097..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/create_reservation_group.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setReservationGroupId($reservationGroupId) - ->setReservationGroup($reservationGroup); - - // Call the API and handle any network failures. - try { - /** @var ReservationGroup $response */ - $response = $reservationServiceClient->createReservationGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It 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]'); - $reservationGroupId = '[RESERVATION_GROUP_ID]'; - - create_reservation_group_sample($formattedParent, $reservationGroupId); -} -// [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_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 407f9295ba2a..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 d252076369ea..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 822b4fd656fc..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/delete_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation_group.php deleted file mode 100644 index 191893302c9d..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/delete_reservation_group.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $reservationServiceClient->deleteReservationGroup($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::reservationGroupName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION_GROUP]' - ); - - delete_reservation_group_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php deleted file mode 100644 index e08330131210..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/failover_reservation.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Reservation $response */ - $response = $reservationServiceClient->failoverReservation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It 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]' - ); - - failover_reservation_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_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 e09c6f2e497a..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 faaaf2c8bfa3..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_iam_policy.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_iam_policy.php deleted file mode 100644 index d4dfffc2f9b8..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_iam_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_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 081b880f2e5a..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/get_reservation_group.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation_group.php deleted file mode 100644 index f6820c257f36..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/get_reservation_group.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReservationGroup $response */ - $response = $reservationServiceClient->getReservationGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It 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::reservationGroupName( - '[PROJECT]', - '[LOCATION]', - '[RESERVATION_GROUP]' - ); - - get_reservation_group_sample($formattedName); -} -// [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_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 c30ca29f847d..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 8058073ea7de..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_reservation_groups.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservation_groups.php deleted file mode 100644 index 0fe83ffbd53d..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/list_reservation_groups.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reservationServiceClient->listReservationGroups($request); - - /** @var ReservationGroup $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_reservation_groups_sample($formattedParent); -} -// [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_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 57e42bdc7dbc..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 8c64ee7928db..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 8e2bce8e2f01..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 9723c75ece98..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 54bb0d1a8fee..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/set_iam_policy.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/set_iam_policy.php deleted file mode 100644 index b855fb6ce017..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/set_iam_policy.php +++ /dev/null @@ -1,82 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_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 0d01200d3af6..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/test_iam_permissions.php b/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/test_iam_permissions.php deleted file mode 100644 index 26cc069ccb02..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/samples/V1/ReservationServiceClient/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 = $reservationServiceClient->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 bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_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 7902e05748bb..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 3b2c32a698f7..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 e49d16d4c0f2..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 331faa64ef9a..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 14e5982b3ec2..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/Client/ReservationServiceClient.php +++ /dev/null @@ -1,1349 +0,0 @@ - createAssignmentAsync(CreateAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCapacityCommitmentAsync(CreateCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReservationAsync(CreateReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReservationGroupAsync(CreateReservationGroupRequest $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 deleteReservationGroupAsync(DeleteReservationGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface failoverReservationAsync(FailoverReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBiReservationAsync(GetBiReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCapacityCommitmentAsync(GetCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReservationAsync(GetReservationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReservationGroupAsync(GetReservationGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssignmentsAsync(ListAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCapacityCommitmentsAsync(ListCapacityCommitmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReservationGroupsAsync(ListReservationGroupsRequest $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 setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitCapacityCommitmentAsync(SplitCapacityCommitmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $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, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reservation_group resource. - * - * @param string $project - * @param string $location - * @param string $reservationGroup - * - * @return string The formatted reservation_group resource. - */ - public static function reservationGroupName(string $project, string $location, string $reservationGroup): string - { - return self::getPathTemplate('reservationGroup')->render([ - 'project' => $project, - 'location' => $location, - 'reservation_group' => $reservationGroup, - ]); - } - - /** - * 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} - * - reservationGroup: projects/{project}/locations/{location}/reservationGroups/{reservation_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|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigqueryreservation.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\BigQuery\Reservation\V1\ReservationServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ReservationServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates 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(); - } - - /** - * Creates a new reservation group. - * - * The async variant is - * {@see ReservationServiceClient::createReservationGroupAsync()} . - * - * @example samples/V1/ReservationServiceClient/create_reservation_group.php - * - * @param CreateReservationGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReservationGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReservationGroup(CreateReservationGroupRequest $request, array $callOptions = []): ReservationGroup - { - return $this->startApiCall('CreateReservationGroup', $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(); - } - - /** - * Deletes a reservation. - * Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - * assignments. - * - * The async variant is - * {@see ReservationServiceClient::deleteReservationGroupAsync()} . - * - * @example samples/V1/ReservationServiceClient/delete_reservation_group.php - * - * @param DeleteReservationGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteReservationGroup(DeleteReservationGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteReservationGroup', $request, $callOptions)->wait(); - } - - /** - * Fail over a reservation to the secondary location. The operation should be - * done in the current secondary location, which will be promoted to the - * new primary location for the reservation. - * Attempting to failover a reservation in the current primary location will - * fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - * - * The async variant is {@see ReservationServiceClient::failoverReservationAsync()} - * . - * - * @example samples/V1/ReservationServiceClient/failover_reservation.php - * - * @param FailoverReservationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 failoverReservation(FailoverReservationRequest $request, array $callOptions = []): Reservation - { - return $this->startApiCall('FailoverReservation', $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(); - } - - /** - * Gets the access control policy for a resource. - * May return: - * - * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - * permission to view it. - * * An empty policy if the resource exists but doesn't have a set policy. - * - * Supported resources are: - * - Reservations - * - ReservationAssignments - * - * To call this method, you must have the following Google IAM permissions: - * - * - `bigqueryreservation.reservations.getIamPolicy` to get policies on - * reservations. - * - * The async variant is {@see ReservationServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ReservationServiceClient/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 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(); - } - - /** - * Returns information about the reservation group. - * - * The async variant is {@see ReservationServiceClient::getReservationGroupAsync()} - * . - * - * @example samples/V1/ReservationServiceClient/get_reservation_group.php - * - * @param GetReservationGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReservationGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReservationGroup(GetReservationGroupRequest $request, array $callOptions = []): ReservationGroup - { - return $this->startApiCall('GetReservationGroup', $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 reservation groups for the project in the specified location. - * - * The async variant is - * {@see ReservationServiceClient::listReservationGroupsAsync()} . - * - * @example samples/V1/ReservationServiceClient/list_reservation_groups.php - * - * @param ListReservationGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReservationGroups(ListReservationGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReservationGroups', $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); - } - - /** - * Sets an access control policy for a resource. Replaces any existing - * policy. - * - * Supported resources are: - * - Reservations - * - * To call this method, you must have the following Google IAM permissions: - * - * - `bigqueryreservation.reservations.setIamPolicy` to set policies on - * reservations. - * - * The async variant is {@see ReservationServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ReservationServiceClient/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(); - } - - /** - * 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(); - } - - /** - * Gets your permissions on a resource. Returns an empty set of permissions if - * the resource doesn't exist. - * - * Supported resources are: - * - Reservations - * - * No Google IAM permissions are required to call this method. - * - * The async variant is {@see ReservationServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/ReservationServiceClient/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 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 6fe459fa920c..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,163 +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" - ] - }, - "CreateReservationGroup": { - "methods": [ - "createReservationGroup" - ] - }, - "DeleteAssignment": { - "methods": [ - "deleteAssignment" - ] - }, - "DeleteCapacityCommitment": { - "methods": [ - "deleteCapacityCommitment" - ] - }, - "DeleteReservation": { - "methods": [ - "deleteReservation" - ] - }, - "DeleteReservationGroup": { - "methods": [ - "deleteReservationGroup" - ] - }, - "FailoverReservation": { - "methods": [ - "failoverReservation" - ] - }, - "GetBiReservation": { - "methods": [ - "getBiReservation" - ] - }, - "GetCapacityCommitment": { - "methods": [ - "getCapacityCommitment" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetReservation": { - "methods": [ - "getReservation" - ] - }, - "GetReservationGroup": { - "methods": [ - "getReservationGroup" - ] - }, - "ListAssignments": { - "methods": [ - "listAssignments" - ] - }, - "ListCapacityCommitments": { - "methods": [ - "listCapacityCommitments" - ] - }, - "ListReservationGroups": { - "methods": [ - "listReservationGroups" - ] - }, - "ListReservations": { - "methods": [ - "listReservations" - ] - }, - "MergeCapacityCommitments": { - "methods": [ - "mergeCapacityCommitments" - ] - }, - "MoveAssignment": { - "methods": [ - "moveAssignment" - ] - }, - "SearchAllAssignments": { - "methods": [ - "searchAllAssignments" - ] - }, - "SearchAssignments": { - "methods": [ - "searchAssignments" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "SplitCapacityCommitment": { - "methods": [ - "splitCapacityCommitment" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "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 cfb23efbb0f3..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_client_config.json +++ /dev/null @@ -1,190 +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" - }, - "CreateReservationGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "DeleteReservationGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "FailoverReservation": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_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" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetReservation": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetReservationGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "ListReservationGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SplitCapacityCommitment": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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 def998d1983a..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_descriptor_config.php +++ /dev/null @@ -1,436 +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', - ], - ], - ], - ], - 'CreateReservationGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ReservationGroup', - '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', - ], - ], - ], - ], - 'DeleteReservationGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FailoverReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', - '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', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetReservation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\Reservation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReservationGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ReservationGroup', - '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', - ], - ], - ], - ], - 'ListReservationGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReservationGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\ListReservationGroupsResponse', - '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', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'SplitCapacityCommitment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Reservation\V1\SplitCapacityCommitmentResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - '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}', - 'reservationGroup' => 'projects/{project}/locations/{location}/reservationGroups/{reservation_group}', - ], - ], - ], -]; 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 5e4ea53c2316..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/src/V1/resources/reservation_service_rest_client_config.php +++ /dev/null @@ -1,389 +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', - ], - ], - ], - ], - 'CreateReservationGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservationGroups', - 'body' => 'reservation_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'reservation_group_id', - ], - ], - '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', - ], - ], - ], - ], - 'DeleteReservationGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservationGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FailoverReservation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}:failoverReservation', - 'body' => '*', - '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', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetReservation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReservationGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reservationGroups/*}', - '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', - ], - ], - ], - ], - 'ListReservationGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reservationGroups', - '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', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SplitCapacityCommitment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/capacityCommitments/*}:split', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - '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 87aa81d25836..000000000000 --- a/owl-bot-staging/BigQueryReservation/v1/tests/Unit/V1/Client/ReservationServiceClientTest.php +++ /dev/null @@ -1,2133 +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'; - $enableGeminiInBigquery = true; - $principal = 'principal-1812041682'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); - $expectedResponse->setPrincipal($principal); - $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; - $isFlatRate = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setIsFlatRate($isFlatRate); - $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; - $primaryLocation = 'primaryLocation182084946'; - $secondaryLocation = 'secondaryLocation-1339637216'; - $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; - $maxSlots = 234568806; - $reservationGroup = 'reservationGroup-2146724788'; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setPrimaryLocation($primaryLocation); - $expectedResponse->setSecondaryLocation($secondaryLocation); - $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); - $expectedResponse->setMaxSlots($maxSlots); - $expectedResponse->setReservationGroup($reservationGroup); - $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 createReservationGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new ReservationGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $reservationGroupId = 'reservationGroupId-1015027218'; - $reservationGroup = new ReservationGroup(); - $request = (new CreateReservationGroupRequest()) - ->setParent($formattedParent) - ->setReservationGroupId($reservationGroupId) - ->setReservationGroup($reservationGroup); - $response = $gapicClient->createReservationGroup($request); - $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/CreateReservationGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReservationGroupId(); - $this->assertProtobufEquals($reservationGroupId, $actualValue); - $actualValue = $actualRequestObject->getReservationGroup(); - $this->assertProtobufEquals($reservationGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReservationGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = 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]'); - $reservationGroupId = 'reservationGroupId-1015027218'; - $reservationGroup = new ReservationGroup(); - $request = (new CreateReservationGroupRequest()) - ->setParent($formattedParent) - ->setReservationGroupId($reservationGroupId) - ->setReservationGroup($reservationGroup); - try { - $gapicClient->createReservationGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 deleteReservationGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); - $request = (new DeleteReservationGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteReservationGroup($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/DeleteReservationGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReservationGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); - $request = (new DeleteReservationGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteReservationGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function failoverReservationTest() - { - $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; - $primaryLocation = 'primaryLocation182084946'; - $secondaryLocation = 'secondaryLocation-1339637216'; - $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; - $maxSlots = 234568806; - $reservationGroup = 'reservationGroup-2146724788'; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name2); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setPrimaryLocation($primaryLocation); - $expectedResponse->setSecondaryLocation($secondaryLocation); - $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); - $expectedResponse->setMaxSlots($maxSlots); - $expectedResponse->setReservationGroup($reservationGroup); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reservationName('[PROJECT]', '[LOCATION]', '[RESERVATION]'); - $request = (new FailoverReservationRequest()) - ->setName($formattedName); - $response = $gapicClient->failoverReservation($request); - $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/FailoverReservation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function failoverReservationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = 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 FailoverReservationRequest()) - ->setName($formattedName); - try { - $gapicClient->failoverReservation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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; - $isFlatRate = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name2); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setIsFlatRate($isFlatRate); - $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 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.reservation.v1.ReservationService/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 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; - $primaryLocation = 'primaryLocation182084946'; - $secondaryLocation = 'secondaryLocation-1339637216'; - $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; - $maxSlots = 234568806; - $reservationGroup = 'reservationGroup-2146724788'; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name2); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setPrimaryLocation($primaryLocation); - $expectedResponse->setSecondaryLocation($secondaryLocation); - $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); - $expectedResponse->setMaxSlots($maxSlots); - $expectedResponse->setReservationGroup($reservationGroup); - $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 getReservationGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ReservationGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); - $request = (new GetReservationGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getReservationGroup($request); - $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/GetReservationGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReservationGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reservationGroupName('[PROJECT]', '[LOCATION]', '[RESERVATION_GROUP]'); - $request = (new GetReservationGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getReservationGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 listReservationGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reservationGroupsElement = new ReservationGroup(); - $reservationGroups = [ - $reservationGroupsElement, - ]; - $expectedResponse = new ListReservationGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReservationGroups($reservationGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListReservationGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReservationGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReservationGroups()[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/ListReservationGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReservationGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = 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 ListReservationGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReservationGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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; - $isFlatRate = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setIsFlatRate($isFlatRate); - $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'; - $enableGeminiInBigquery = true; - $principal = 'principal-1812041682'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name2); - $expectedResponse->setAssignee($assignee); - $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); - $expectedResponse->setPrincipal($principal); - $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 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.reservation.v1.ReservationService/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 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 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.reservation.v1.ReservationService/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 updateAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $assignee = 'assignee-369881649'; - $enableGeminiInBigquery = true; - $principal = 'principal-1812041682'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); - $expectedResponse->setPrincipal($principal); - $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; - $isFlatRate = false; - $expectedResponse = new CapacityCommitment(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCount($slotCount); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setIsFlatRate($isFlatRate); - $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; - $primaryLocation = 'primaryLocation182084946'; - $secondaryLocation = 'secondaryLocation-1339637216'; - $originalPrimaryLocation = 'originalPrimaryLocation-1626473984'; - $maxSlots = 234568806; - $reservationGroup = 'reservationGroup-2146724788'; - $expectedResponse = new Reservation(); - $expectedResponse->setName($name); - $expectedResponse->setSlotCapacity($slotCapacity); - $expectedResponse->setIgnoreIdleSlots($ignoreIdleSlots); - $expectedResponse->setConcurrency($concurrency); - $expectedResponse->setMultiRegionAuxiliary($multiRegionAuxiliary); - $expectedResponse->setPrimaryLocation($primaryLocation); - $expectedResponse->setSecondaryLocation($secondaryLocation); - $expectedResponse->setOriginalPrimaryLocation($originalPrimaryLocation); - $expectedResponse->setMaxSlots($maxSlots); - $expectedResponse->setReservationGroup($reservationGroup); - $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'; - $enableGeminiInBigquery = true; - $principal = 'principal-1812041682'; - $expectedResponse = new Assignment(); - $expectedResponse->setName($name); - $expectedResponse->setAssignee($assignee); - $expectedResponse->setEnableGeminiInBigquery($enableGeminiInBigquery); - $expectedResponse->setPrincipal($principal); - $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()); - } -}