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 HttpRouteAction extends \Google\Collection
21{
22  protected $collection_key = 'weightedBackendServices';
23  protected $corsPolicyType = CorsPolicy::class;
24  protected $corsPolicyDataType = '';
25  protected $faultInjectionPolicyType = HttpFaultInjection::class;
26  protected $faultInjectionPolicyDataType = '';
27  protected $maxStreamDurationType = Duration::class;
28  protected $maxStreamDurationDataType = '';
29  protected $requestMirrorPolicyType = RequestMirrorPolicy::class;
30  protected $requestMirrorPolicyDataType = '';
31  protected $retryPolicyType = HttpRetryPolicy::class;
32  protected $retryPolicyDataType = '';
33  protected $timeoutType = Duration::class;
34  protected $timeoutDataType = '';
35  protected $urlRewriteType = UrlRewrite::class;
36  protected $urlRewriteDataType = '';
37  protected $weightedBackendServicesType = WeightedBackendService::class;
38  protected $weightedBackendServicesDataType = 'array';
39
40  /**
41   * @param CorsPolicy
42   */
43  public function setCorsPolicy(CorsPolicy $corsPolicy)
44  {
45    $this->corsPolicy = $corsPolicy;
46  }
47  /**
48   * @return CorsPolicy
49   */
50  public function getCorsPolicy()
51  {
52    return $this->corsPolicy;
53  }
54  /**
55   * @param HttpFaultInjection
56   */
57  public function setFaultInjectionPolicy(HttpFaultInjection $faultInjectionPolicy)
58  {
59    $this->faultInjectionPolicy = $faultInjectionPolicy;
60  }
61  /**
62   * @return HttpFaultInjection
63   */
64  public function getFaultInjectionPolicy()
65  {
66    return $this->faultInjectionPolicy;
67  }
68  /**
69   * @param Duration
70   */
71  public function setMaxStreamDuration(Duration $maxStreamDuration)
72  {
73    $this->maxStreamDuration = $maxStreamDuration;
74  }
75  /**
76   * @return Duration
77   */
78  public function getMaxStreamDuration()
79  {
80    return $this->maxStreamDuration;
81  }
82  /**
83   * @param RequestMirrorPolicy
84   */
85  public function setRequestMirrorPolicy(RequestMirrorPolicy $requestMirrorPolicy)
86  {
87    $this->requestMirrorPolicy = $requestMirrorPolicy;
88  }
89  /**
90   * @return RequestMirrorPolicy
91   */
92  public function getRequestMirrorPolicy()
93  {
94    return $this->requestMirrorPolicy;
95  }
96  /**
97   * @param HttpRetryPolicy
98   */
99  public function setRetryPolicy(HttpRetryPolicy $retryPolicy)
100  {
101    $this->retryPolicy = $retryPolicy;
102  }
103  /**
104   * @return HttpRetryPolicy
105   */
106  public function getRetryPolicy()
107  {
108    return $this->retryPolicy;
109  }
110  /**
111   * @param Duration
112   */
113  public function setTimeout(Duration $timeout)
114  {
115    $this->timeout = $timeout;
116  }
117  /**
118   * @return Duration
119   */
120  public function getTimeout()
121  {
122    return $this->timeout;
123  }
124  /**
125   * @param UrlRewrite
126   */
127  public function setUrlRewrite(UrlRewrite $urlRewrite)
128  {
129    $this->urlRewrite = $urlRewrite;
130  }
131  /**
132   * @return UrlRewrite
133   */
134  public function getUrlRewrite()
135  {
136    return $this->urlRewrite;
137  }
138  /**
139   * @param WeightedBackendService[]
140   */
141  public function setWeightedBackendServices($weightedBackendServices)
142  {
143    $this->weightedBackendServices = $weightedBackendServices;
144  }
145  /**
146   * @return WeightedBackendService[]
147   */
148  public function getWeightedBackendServices()
149  {
150    return $this->weightedBackendServices;
151  }
152}
153
154// Adding a class alias for backwards compatibility with the previous class name.
155class_alias(HttpRouteAction::class, 'Google_Service_Compute_HttpRouteAction');
156