Skip to content

Commit

Permalink
generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthart committed Jul 18, 2024
1 parent e63c7f5 commit 452cafc
Show file tree
Hide file tree
Showing 101 changed files with 301 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ DefaultGoldenKitchenSinkRestStub::GenerateIdToken(
absl::StrCat("/", rest_internal::DetermineApiVersion("v1", options), "/token:generate"),
rest_internal::TrimEmptyQueryParameters({std::make_pair("name", request.name()),
std::make_pair("audience", request.audience()),
std::make_pair("include_email", request.include_email() ? "1" : "0")}));
std::make_pair("include_email", (request.include_email() ? "1" : "0"))}));
}

StatusOr<google::test::admin::database::v1::WriteLogEntriesResponse>
Expand Down
10 changes: 7 additions & 3 deletions google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Status DefaultDatasetServiceRestStub::DeleteDataset(
"projects", "/", request.project_id(), "/", "datasets", "/",
request.dataset_id()),
rest_internal::TrimEmptyQueryParameters({std::make_pair(
"delete_contents", request.delete_contents() ? "1" : "0")}));
"delete_contents", (request.delete_contents() ? "1" : "0"))}));
}

StatusOr<google::cloud::bigquery::v2::DatasetList>
Expand All @@ -117,8 +117,12 @@ DefaultDatasetServiceRestStub::ListDatasets(
rest_internal::DetermineApiVersion("v2", options), "/",
"projects", "/", request.project_id(), "/", "datasets"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("page_token", request.page_token()),
std::make_pair("all", request.all() ? "1" : "0"),
{std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("page_token", request.page_token()),
std::make_pair("all", (request.all() ? "1" : "0")),
std::make_pair("filter", request.filter())}));
}

Expand Down
25 changes: 23 additions & 2 deletions google/cloud/bigquerycontrol/v2/internal/job_rest_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,18 @@ DefaultJobServiceRestStub::ListJobs(
rest_internal::DetermineApiVersion("v2", options), "/",
"projects", "/", request.project_id(), "/", "jobs"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("all_users", request.all_users() ? "1" : "0"),
{std::make_pair("all_users", (request.all_users() ? "1" : "0")),
std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("min_creation_time",
std::to_string(request.min_creation_time())),
std::make_pair(
"max_creation_time",
(request.has_max_creation_time()
? std::to_string(request.max_creation_time().value())
: "")),
std::make_pair("page_token", request.page_token()),
std::make_pair("projection", std::to_string(request.projection())),
std::make_pair("parent_job_id", request.parent_job_id())}));
Expand All @@ -125,7 +134,19 @@ DefaultJobServiceRestStub::GetQueryResults(
"projects", "/", request.project_id(), "/", "queries", "/",
request.job_id()),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("page_token", request.page_token()),
{std::make_pair("start_index",
(request.has_start_index()
? std::to_string(request.start_index().value())
: "")),
std::make_pair("page_token", request.page_token()),
std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("timeout_ms",
(request.has_timeout_ms()
? std::to_string(request.timeout_ms().value())
: "")),
std::make_pair("location", request.location())}));
}

Expand Down
6 changes: 5 additions & 1 deletion google/cloud/bigquerycontrol/v2/internal/model_rest_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ DefaultModelServiceRestStub::ListModels(
"projects", "/", request.project_id(), "/", "datasets", "/",
request.dataset_id(), "/", "models"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("page_token", request.page_token())}));
{std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("page_token", request.page_token())}));
}

StatusOr<google::cloud::bigquery::v2::Model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ DefaultRoutineServiceRestStub::ListRoutines(
"projects", "/", request.project_id(), "/", "datasets", "/",
request.dataset_id(), "/", "routines"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("page_token", request.page_token()),
{std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("page_token", request.page_token()),
std::make_pair("filter", request.filter())}));
}

Expand Down
10 changes: 7 additions & 3 deletions google/cloud/bigquerycontrol/v2/internal/table_rest_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DefaultTableServiceRestStub::PatchTable(
request.dataset_id(), "/", "tables", "/",
request.table_id()),
rest_internal::TrimEmptyQueryParameters({std::make_pair(
"autodetect_schema", request.autodetect_schema() ? "1" : "0")}));
"autodetect_schema", (request.autodetect_schema() ? "1" : "0"))}));
}

StatusOr<google::cloud::bigquery::v2::Table>
Expand All @@ -98,7 +98,7 @@ DefaultTableServiceRestStub::UpdateTable(
request.dataset_id(), "/", "tables", "/",
request.table_id()),
rest_internal::TrimEmptyQueryParameters({std::make_pair(
"autodetect_schema", request.autodetect_schema() ? "1" : "0")}));
"autodetect_schema", (request.autodetect_schema() ? "1" : "0"))}));
}

Status DefaultTableServiceRestStub::DeleteTable(
Expand Down Expand Up @@ -126,7 +126,11 @@ DefaultTableServiceRestStub::ListTables(
"projects", "/", request.project_id(), "/", "datasets", "/",
request.dataset_id(), "/", "tables"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("page_token", request.page_token())}));
{std::make_pair("max_results",
(request.has_max_results()
? std::to_string(request.max_results().value())
: "")),
std::make_pair("page_token", request.page_token())}));
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ DefaultAcceleratorTypesRestStub::AggregatedListAcceleratorTypes(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -100,7 +100,7 @@ DefaultAcceleratorTypesRestStub::ListAcceleratorTypes(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ DefaultAddressesRestStub::AggregatedListAddresses(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -203,7 +203,7 @@ DefaultAddressesRestStub::ListAddresses(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ DefaultAutoscalersRestStub::AggregatedListAutoscalers(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -204,7 +204,7 @@ DefaultAutoscalersRestStub::ListAutoscalers(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ DefaultBackendBucketsRestStub::ListBackendBuckets(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ DefaultBackendServicesRestStub::AggregatedListBackendServices(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -345,7 +345,7 @@ DefaultBackendServicesRestStub::ListBackendServices(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

StatusOr<google::cloud::cpp::compute::v1::BackendServiceListUsable>
Expand All @@ -367,7 +367,7 @@ DefaultBackendServicesRestStub::ListUsable(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ DefaultDiskTypesRestStub::AggregatedListDiskTypes(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -97,7 +97,7 @@ DefaultDiskTypesRestStub::ListDiskTypes(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Expand Down
10 changes: 5 additions & 5 deletions google/cloud/compute/disks/v1/internal/disks_rest_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ DefaultDisksRestStub::AggregatedListDisks(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("filter", request.filter()),
std::make_pair("include_all_scopes",
request.include_all_scopes() ? "1" : "0"),
(request.include_all_scopes() ? "1" : "0")),
std::make_pair("max_results", std::to_string(request.max_results())),
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0"),
(request.return_partial_success() ? "1" : "0")),
std::make_pair("service_project_number",
request.service_project_number())}));
}
Expand Down Expand Up @@ -195,7 +195,7 @@ DefaultDisksRestStub::AsyncCreateSnapshot(
request.disk(), "/", "createSnapshot"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("guest_flush",
request.guest_flush() ? "1" : "0"),
(request.guest_flush() ? "1" : "0")),
std::make_pair("request_id", request.request_id())})));
},
std::move(p),
Expand Down Expand Up @@ -223,7 +223,7 @@ DefaultDisksRestStub::CreateSnapshot(
request.zone(), "/", "disks", "/", request.disk(), "/",
"createSnapshot"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("guest_flush", request.guest_flush() ? "1" : "0"),
{std::make_pair("guest_flush", (request.guest_flush() ? "1" : "0")),
std::make_pair("request_id", request.request_id())}));
}

Expand Down Expand Up @@ -371,7 +371,7 @@ DefaultDisksRestStub::ListDisks(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ DefaultExternalVpnGatewaysRestStub::ListExternalVpnGateways(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ DefaultFirewallPoliciesRestStub::AsyncAddAssociation(
rest_internal::TrimEmptyQueryParameters(
{std::make_pair(
"replace_existing_association",
request.replace_existing_association() ? "1" : "0"),
(request.replace_existing_association() ? "1" : "0")),
std::make_pair("request_id", request.request_id())})));
},
std::move(p),
Expand Down Expand Up @@ -99,7 +99,7 @@ DefaultFirewallPoliciesRestStub::AddAssociation(
request.firewall_policy(), "/", "addAssociation"),
rest_internal::TrimEmptyQueryParameters(
{std::make_pair("replace_existing_association",
request.replace_existing_association() ? "1" : "0"),
(request.replace_existing_association() ? "1" : "0")),
std::make_pair("request_id", request.request_id())}));
}

Expand Down Expand Up @@ -392,7 +392,7 @@ DefaultFirewallPoliciesRestStub::ListFirewallPolicies(
std::make_pair("page_token", request.page_token()),
std::make_pair("parent_id", request.parent_id()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

StatusOr<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ DefaultFirewallsRestStub::ListFirewalls(
std::make_pair("order_by", request.order_by()),
std::make_pair("page_token", request.page_token()),
std::make_pair("return_partial_success",
request.return_partial_success() ? "1" : "0")}));
(request.return_partial_success() ? "1" : "0"))}));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
Expand Down
Loading

0 comments on commit 452cafc

Please sign in to comment.