1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Compute;
19
20class BackendBucketCdnPolicy extends \Google\Collection
21{
22  protected $collection_key = 'signedUrlKeyNames';
23  protected $bypassCacheOnRequestHeadersType = BackendBucketCdnPolicyBypassCacheOnRequestHeader::class;
24  protected $bypassCacheOnRequestHeadersDataType = 'array';
25  protected $cacheKeyPolicyType = BackendBucketCdnPolicyCacheKeyPolicy::class;
26  protected $cacheKeyPolicyDataType = '';
27  /**
28   * @var string
29   */
30  public $cacheMode;
31  /**
32   * @var int
33   */
34  public $clientTtl;
35  /**
36   * @var int
37   */
38  public $defaultTtl;
39  /**
40   * @var int
41   */
42  public $maxTtl;
43  /**
44   * @var bool
45   */
46  public $negativeCaching;
47  protected $negativeCachingPolicyType = BackendBucketCdnPolicyNegativeCachingPolicy::class;
48  protected $negativeCachingPolicyDataType = 'array';
49  /**
50   * @var bool
51   */
52  public $requestCoalescing;
53  /**
54   * @var int
55   */
56  public $serveWhileStale;
57  /**
58   * @var string
59   */
60  public $signedUrlCacheMaxAgeSec;
61  /**
62   * @var string[]
63   */
64  public $signedUrlKeyNames;
65
66  /**
67   * @param BackendBucketCdnPolicyBypassCacheOnRequestHeader[]
68   */
69  public function setBypassCacheOnRequestHeaders($bypassCacheOnRequestHeaders)
70  {
71    $this->bypassCacheOnRequestHeaders = $bypassCacheOnRequestHeaders;
72  }
73  /**
74   * @return BackendBucketCdnPolicyBypassCacheOnRequestHeader[]
75   */
76  public function getBypassCacheOnRequestHeaders()
77  {
78    return $this->bypassCacheOnRequestHeaders;
79  }
80  /**
81   * @param BackendBucketCdnPolicyCacheKeyPolicy
82   */
83  public function setCacheKeyPolicy(BackendBucketCdnPolicyCacheKeyPolicy $cacheKeyPolicy)
84  {
85    $this->cacheKeyPolicy = $cacheKeyPolicy;
86  }
87  /**
88   * @return BackendBucketCdnPolicyCacheKeyPolicy
89   */
90  public function getCacheKeyPolicy()
91  {
92    return $this->cacheKeyPolicy;
93  }
94  /**
95   * @param string
96   */
97  public function setCacheMode($cacheMode)
98  {
99    $this->cacheMode = $cacheMode;
100  }
101  /**
102   * @return string
103   */
104  public function getCacheMode()
105  {
106    return $this->cacheMode;
107  }
108  /**
109   * @param int
110   */
111  public function setClientTtl($clientTtl)
112  {
113    $this->clientTtl = $clientTtl;
114  }
115  /**
116   * @return int
117   */
118  public function getClientTtl()
119  {
120    return $this->clientTtl;
121  }
122  /**
123   * @param int
124   */
125  public function setDefaultTtl($defaultTtl)
126  {
127    $this->defaultTtl = $defaultTtl;
128  }
129  /**
130   * @return int
131   */
132  public function getDefaultTtl()
133  {
134    return $this->defaultTtl;
135  }
136  /**
137   * @param int
138   */
139  public function setMaxTtl($maxTtl)
140  {
141    $this->maxTtl = $maxTtl;
142  }
143  /**
144   * @return int
145   */
146  public function getMaxTtl()
147  {
148    return $this->maxTtl;
149  }
150  /**
151   * @param bool
152   */
153  public function setNegativeCaching($negativeCaching)
154  {
155    $this->negativeCaching = $negativeCaching;
156  }
157  /**
158   * @return bool
159   */
160  public function getNegativeCaching()
161  {
162    return $this->negativeCaching;
163  }
164  /**
165   * @param BackendBucketCdnPolicyNegativeCachingPolicy[]
166   */
167  public function setNegativeCachingPolicy($negativeCachingPolicy)
168  {
169    $this->negativeCachingPolicy = $negativeCachingPolicy;
170  }
171  /**
172   * @return BackendBucketCdnPolicyNegativeCachingPolicy[]
173   */
174  public function getNegativeCachingPolicy()
175  {
176    return $this->negativeCachingPolicy;
177  }
178  /**
179   * @param bool
180   */
181  public function setRequestCoalescing($requestCoalescing)
182  {
183    $this->requestCoalescing = $requestCoalescing;
184  }
185  /**
186   * @return bool
187   */
188  public function getRequestCoalescing()
189  {
190    return $this->requestCoalescing;
191  }
192  /**
193   * @param int
194   */
195  public function setServeWhileStale($serveWhileStale)
196  {
197    $this->serveWhileStale = $serveWhileStale;
198  }
199  /**
200   * @return int
201   */
202  public function getServeWhileStale()
203  {
204    return $this->serveWhileStale;
205  }
206  /**
207   * @param string
208   */
209  public function setSignedUrlCacheMaxAgeSec($signedUrlCacheMaxAgeSec)
210  {
211    $this->signedUrlCacheMaxAgeSec = $signedUrlCacheMaxAgeSec;
212  }
213  /**
214   * @return string
215   */
216  public function getSignedUrlCacheMaxAgeSec()
217  {
218    return $this->signedUrlCacheMaxAgeSec;
219  }
220  /**
221   * @param string[]
222   */
223  public function setSignedUrlKeyNames($signedUrlKeyNames)
224  {
225    $this->signedUrlKeyNames = $signedUrlKeyNames;
226  }
227  /**
228   * @return string[]
229   */
230  public function getSignedUrlKeyNames()
231  {
232    return $this->signedUrlKeyNames;
233  }
234}
235
236// Adding a class alias for backwards compatibility with the previous class name.
237class_alias(BackendBucketCdnPolicy::class, 'Google_Service_Compute_BackendBucketCdnPolicy');
238