Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
bucket_logging.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_LOGGING_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_LOGGING_H
17
18#include "google/cloud/storage/version.h"
19#include <iosfwd>
20#include <string>
21#include <tuple>
22#include <utility>
23
24namespace google {
25namespace cloud {
26namespace storage {
27GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
28
29/**
30 * The Logging configuration for a Bucket.
31 *
32 * @see https://cloud.google.com/storage/docs/access-logs for general
33 * information about using access logs with Google Cloud Storage.
34 */
35struct BucketLogging {
36 std::string log_bucket;
37 std::string log_object_prefix;
38};
39
40inline bool operator==(BucketLogging const& lhs, BucketLogging const& rhs) {
41 return std::tie(lhs.log_bucket, lhs.log_object_prefix) ==
42 std::tie(rhs.log_bucket, rhs.log_object_prefix);
43}
44
45inline bool operator<(BucketLogging const& lhs, BucketLogging const& rhs) {
46 return std::tie(lhs.log_bucket, lhs.log_object_prefix) <
47 std::tie(rhs.log_bucket, rhs.log_object_prefix);
48}
49
50inline bool operator!=(BucketLogging const& lhs, BucketLogging const& rhs) {
51 return std::rel_ops::operator!=(lhs, rhs);
52}
53
54inline bool operator>(BucketLogging const& lhs, BucketLogging const& rhs) {
55 return std::rel_ops::operator>(lhs, rhs);
56}
57
58inline bool operator<=(BucketLogging const& lhs, BucketLogging const& rhs) {
59 return std::rel_ops::operator<=(lhs, rhs);
60}
61
62inline bool operator>=(BucketLogging const& lhs, BucketLogging const& rhs) {
63 return std::rel_ops::operator>=(lhs, rhs);
64}
65
66std::ostream& operator<<(std::ostream& os, BucketLogging const& rhs);
67
68GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
69} // namespace storage
70} // namespace cloud
71} // namespace google
72
73#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_LOGGING_H
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
bool operator>=(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:62
bool operator<=(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:58
bool operator<(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:45
bool operator==(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:40
bool operator>(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:54
bool operator!=(BucketLogging const &lhs, BucketLogging const &rhs)
Definition: bucket_logging.h:50
The Logging configuration for a Bucket.
Definition: bucket_logging.h:35
std::string log_bucket
Definition: bucket_logging.h:36
std::string log_object_prefix
Definition: bucket_logging.h:37