diff --git a/internal/sidekick/internal/rust/templates/http-client/builder.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/builder.rs.mustache new file mode 100644 index 0000000000..4c108e5917 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/builder.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../crate/src/builder.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/client.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/client.rs.mustache new file mode 100644 index 0000000000..89fda84e2d --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/client.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../crate/src/client.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/enum.mustache b/internal/sidekick/internal/rust/templates/http-client/enum.mustache new file mode 100644 index 0000000000..3bf19a68b7 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/enum.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../common/enum}} diff --git a/internal/sidekick/internal/rust/templates/http-client/message.mustache b/internal/sidekick/internal/rust/templates/http-client/message.mustache new file mode 100644 index 0000000000..2f6366ab25 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/message.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../common/message}} diff --git a/internal/sidekick/internal/rust/templates/http-client/mod.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/mod.rs.mustache new file mode 100644 index 0000000000..9f1dbd8264 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/mod.rs.mustache @@ -0,0 +1,50 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +// Copyright {{Codec.CopyrightYear}} Google LLC +{{#Codec.BoilerPlate}} +//{{{.}}} +{{/Codec.BoilerPlate}} + +{{! + The generated code uses deprecated items in: + - setters for deprecated fields. + - fields that reference deprecated messages and enums. + - clients and stubs use deprecated RPCs. + - clients and stubs use deprecated services and deprecated request messages. +}} +{{#HasDeprecatedEntities}} +#![allow(deprecated)] +{{/HasDeprecatedEntities}} + +/// The messages and enums that are part of this client library. +#[allow(clippy::module_inception)] +pub mod model; + +{{! We use explicit links because it is easier to generate the code with them. }} +#[allow(rustdoc::redundant_explicit_links)] +pub mod stub; + +/// Request builders. +pub mod builder; + +/// The client(s) for this client library. +pub mod client; + +#[doc(hidden)] +pub(crate) mod tracing; + +#[doc(hidden)] +pub(crate) mod transport; diff --git a/internal/sidekick/internal/rust/templates/http-client/model.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/model.rs.mustache new file mode 100644 index 0000000000..83ccfc3b48 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/model.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../mod/mod.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/oneof.mustache b/internal/sidekick/internal/rust/templates/http-client/oneof.mustache new file mode 100644 index 0000000000..ac71cef4e1 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/oneof.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../common/oneof}} diff --git a/internal/sidekick/internal/rust/templates/http-client/stub.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/stub.rs.mustache new file mode 100644 index 0000000000..38a385ab7b --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/stub.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../crate/src/stub.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/stub/dynamic.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/stub/dynamic.rs.mustache new file mode 100644 index 0000000000..bdc9b338c7 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/stub/dynamic.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../../crate/src/stub/dynamic.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/tracing.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/tracing.rs.mustache new file mode 100644 index 0000000000..bd44578c88 --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/tracing.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../crate/src/tracing.rs}} diff --git a/internal/sidekick/internal/rust/templates/http-client/transport.rs.mustache b/internal/sidekick/internal/rust/templates/http-client/transport.rs.mustache new file mode 100644 index 0000000000..47047a008f --- /dev/null +++ b/internal/sidekick/internal/rust/templates/http-client/transport.rs.mustache @@ -0,0 +1,16 @@ +{{! +Copyright 2025 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +}} +{{> ../crate/src/transport.rs}}