google-cloud-storage 1.2.0

Google Cloud Client Libraries for Rust - Storage
Documentation
# 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.

[general]
language             = 'rust+prost'
specification-source = 'google/storage/control/v2'

[codec]
copyright-year      = '2025'
template-override   = 'templates/prost'
post-process-protos = """\
let name = format!("{destination}/google.storage.control.v2.rs");
let content = std::fs::read_to_string(&name)
    .expect(format!("should be able to read '{name}'").as_str());
// Rename CloudStorageLocations
let content = content.replace(
    "pub enum CloudStorageLocations ", "pub enum CloudStorageLocationsOneOf ");
let content = content.replace(
    "prost(oneof = \\\"filter::CloudStorageLocations\\\"",
    "prost(oneof = \\\"filter::CloudStorageLocationsOneOf\\\"",
);
let content = content.replace(
    "    filter::CloudStorageLocations,",
    "    filter::CloudStorageLocationsOneOf,",
);
// Rename CloudStorageBuckets
let content = content.replace(
    "pub enum CloudStorageBuckets ", "pub enum CloudStorageBucketsOneOf ");
let content = content.replace(
    "prost(oneof = \\\"filter::CloudStorageBuckets\\\"",
    "prost(oneof = \\\"filter::CloudStorageBucketsOneOf\\\"",
);
let content = content.replace(
    "pub cloud_storage_buckets: ::core::option::Option<filter::CloudStorageBuckets>",
    "pub cloud_storage_buckets: ::core::option::Option<filter::CloudStorageBucketsOneOf>",
);
std::fs::write(&name, content.as_bytes())
    .expect(format!("should be able to write '{name}'").as_str());"""