Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
bucket_custom_placement_config.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_CUSTOM_PLACEMENT_CONFIG_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_CUSTOM_PLACEMENT_CONFIG_H
17
18#include "google/cloud/storage/version.h"
19#include <iosfwd>
20#include <string>
21#include <utility>
22#include <vector>
23
24namespace google {
25namespace cloud {
26namespace storage {
27GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
28
29/**
30 * Configuration for Custom Dual Regions.
31 *
32 * It should specify precisely two eligible regions within the same Multiregion.
33 *
34 * @see Additional information on custom dual regions in the
35 * [feature documentation][cdr-link].
36 *
37 * [cdr-link]: https://cloud.google.com/storage/docs/locations
38 */
40 std::vector<std::string> data_locations;
41};
42
43///@{
44/// @name Comparison operators for BucketCustomPlacementConfig.
45inline bool operator==(BucketCustomPlacementConfig const& lhs,
46 BucketCustomPlacementConfig const& rhs) {
47 return lhs.data_locations == rhs.data_locations;
48}
49
50inline bool operator<(BucketCustomPlacementConfig const& lhs,
51 BucketCustomPlacementConfig const& rhs) {
52 return lhs.data_locations < rhs.data_locations;
53}
54
55inline bool operator!=(BucketCustomPlacementConfig const& lhs,
56 BucketCustomPlacementConfig const& rhs) {
57 return std::rel_ops::operator!=(lhs, rhs);
58}
59
60inline bool operator>(BucketCustomPlacementConfig const& lhs,
61 BucketCustomPlacementConfig const& rhs) {
62 return std::rel_ops::operator>(lhs, rhs);
63}
64
65inline bool operator<=(BucketCustomPlacementConfig const& lhs,
66 BucketCustomPlacementConfig const& rhs) {
67 return std::rel_ops::operator<=(lhs, rhs);
68}
69
70inline bool operator>=(BucketCustomPlacementConfig const& lhs,
71 BucketCustomPlacementConfig const& rhs) {
72 return std::rel_ops::operator>=(lhs, rhs);
73}
74///@}
75
76std::ostream& operator<<(std::ostream& os,
78
79GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
80} // namespace storage
81} // namespace cloud
82} // namespace google
83
84#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_CUSTOM_PLACEMENT_CONFIG_H
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
bool operator<=(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:65
bool operator>(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:60
bool operator==(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:45
bool operator<(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:50
bool operator>=(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:70
bool operator!=(BucketCustomPlacementConfig const &lhs, BucketCustomPlacementConfig const &rhs)
Definition: bucket_custom_placement_config.h:55
Configuration for Custom Dual Regions.
Definition: bucket_custom_placement_config.h:39
std::vector< std::string > data_locations
Definition: bucket_custom_placement_config.h:40