Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
bucket_website.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_WEBSITE_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_WEBSITE_H
17
18#include "google/cloud/storage/version.h"
19#include <string>
20#include <tuple>
21#include <utility>
22
23namespace google {
24namespace cloud {
25namespace storage {
26GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
27
28/**
29 * The website configuration for a Bucket.
30 *
31 * @see https://cloud.google.com/storage/docs/static-website for information on
32 * how to configure Buckets to serve as a static website.
33 */
34struct BucketWebsite {
35 std::string main_page_suffix;
36 std::string not_found_page;
37};
38
39inline bool operator==(BucketWebsite const& lhs, BucketWebsite const& rhs) {
40 return std::tie(lhs.main_page_suffix, lhs.not_found_page) ==
41 std::tie(rhs.main_page_suffix, rhs.not_found_page);
42}
43
44inline bool operator<(BucketWebsite const& lhs, BucketWebsite const& rhs) {
45 return std::tie(lhs.main_page_suffix, lhs.not_found_page) <
46 std::tie(rhs.main_page_suffix, rhs.not_found_page);
47}
48
49inline bool operator!=(BucketWebsite const& lhs, BucketWebsite const& rhs) {
50 return std::rel_ops::operator!=(lhs, rhs);
51}
52
53inline bool operator>(BucketWebsite const& lhs, BucketWebsite const& rhs) {
54 return std::rel_ops::operator>(lhs, rhs);
55}
56
57inline bool operator<=(BucketWebsite const& lhs, BucketWebsite const& rhs) {
58 return std::rel_ops::operator<=(lhs, rhs);
59}
60
61inline bool operator>=(BucketWebsite const& lhs, BucketWebsite const& rhs) {
62 return std::rel_ops::operator>=(lhs, rhs);
63}
64
65GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
66} // namespace storage
67} // namespace cloud
68} // namespace google
69
70#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_BUCKET_WEBSITE_H
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
bool operator!=(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:49
bool operator<=(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:57
bool operator<(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:44
bool operator>(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:53
bool operator>=(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:61
bool operator==(BucketWebsite const &lhs, BucketWebsite const &rhs)
Definition: bucket_website.h:39
The website configuration for a Bucket.
Definition: bucket_website.h:34
std::string main_page_suffix
Definition: bucket_website.h:35
std::string not_found_page
Definition: bucket_website.h:36