Skip to content

Commit ce7fc7f

Browse files
1 parent c7c4f5d commit ce7fc7f

File tree

4 files changed

+206
-1
lines changed

4 files changed

+206
-1
lines changed

src/NetworkSecurity/SecurityProfile.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class SecurityProfile extends \Google\Model
3535
* Profile type for TPPI.
3636
*/
3737
public const TYPE_CUSTOM_INTERCEPT = 'CUSTOM_INTERCEPT';
38+
/**
39+
* Profile type for URL filtering.
40+
*/
41+
public const TYPE_URL_FILTERING = 'URL_FILTERING';
3842
/**
3943
* Output only. Resource creation timestamp.
4044
*
@@ -89,6 +93,8 @@ class SecurityProfile extends \Google\Model
8993
* @var string
9094
*/
9195
public $updateTime;
96+
protected $urlFilteringProfileType = UrlFilteringProfile::class;
97+
protected $urlFilteringProfileDataType = '';
9298

9399
/**
94100
* Output only. Resource creation timestamp.
@@ -228,7 +234,7 @@ public function getThreatPreventionProfile()
228234
* configures.
229235
*
230236
* Accepted values: PROFILE_TYPE_UNSPECIFIED, THREAT_PREVENTION,
231-
* CUSTOM_MIRRORING, CUSTOM_INTERCEPT
237+
* CUSTOM_MIRRORING, CUSTOM_INTERCEPT, URL_FILTERING
232238
*
233239
* @param self::TYPE_* $type
234240
*/
@@ -259,6 +265,22 @@ public function getUpdateTime()
259265
{
260266
return $this->updateTime;
261267
}
268+
/**
269+
* The URL filtering configuration for the SecurityProfile.
270+
*
271+
* @param UrlFilteringProfile $urlFilteringProfile
272+
*/
273+
public function setUrlFilteringProfile(UrlFilteringProfile $urlFilteringProfile)
274+
{
275+
$this->urlFilteringProfile = $urlFilteringProfile;
276+
}
277+
/**
278+
* @return UrlFilteringProfile
279+
*/
280+
public function getUrlFilteringProfile()
281+
{
282+
return $this->urlFilteringProfile;
283+
}
262284
}
263285

264286
// Adding a class alias for backwards compatibility with the previous class name.

src/NetworkSecurity/SecurityProfileGroup.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ class SecurityProfileGroup extends \Google\Model
8888
* @var string
8989
*/
9090
public $updateTime;
91+
/**
92+
* Optional. Reference to a SecurityProfile with the UrlFiltering
93+
* configuration.
94+
*
95+
* @var string
96+
*/
97+
public $urlFilteringProfile;
9198

9299
/**
93100
* Output only. Resource creation timestamp.
@@ -258,6 +265,23 @@ public function getUpdateTime()
258265
{
259266
return $this->updateTime;
260267
}
268+
/**
269+
* Optional. Reference to a SecurityProfile with the UrlFiltering
270+
* configuration.
271+
*
272+
* @param string $urlFilteringProfile
273+
*/
274+
public function setUrlFilteringProfile($urlFilteringProfile)
275+
{
276+
$this->urlFilteringProfile = $urlFilteringProfile;
277+
}
278+
/**
279+
* @return string
280+
*/
281+
public function getUrlFilteringProfile()
282+
{
283+
return $this->urlFilteringProfile;
284+
}
261285
}
262286

263287
// Adding a class alias for backwards compatibility with the previous class name.

src/NetworkSecurity/UrlFilter.php

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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+
18+
namespace Google\Service\NetworkSecurity;
19+
20+
class UrlFilter extends \Google\Collection
21+
{
22+
/**
23+
* Filtering action not specified.
24+
*/
25+
public const FILTERING_ACTION_URL_FILTERING_ACTION_UNSPECIFIED = 'URL_FILTERING_ACTION_UNSPECIFIED';
26+
/**
27+
* The connection matching this filter will be allowed to transmit.
28+
*/
29+
public const FILTERING_ACTION_ALLOW = 'ALLOW';
30+
/**
31+
* The connection matching this filter will be dropped.
32+
*/
33+
public const FILTERING_ACTION_DENY = 'DENY';
34+
protected $collection_key = 'urls';
35+
/**
36+
* Required. The action taken when this filter is applied.
37+
*
38+
* @var string
39+
*/
40+
public $filteringAction;
41+
/**
42+
* Required. The priority of this filter within the URL Filtering Profile.
43+
* Lower integers indicate higher priorities. The priority of a filter must be
44+
* unique within a URL Filtering Profile.
45+
*
46+
* @var int
47+
*/
48+
public $priority;
49+
/**
50+
* Required. The list of strings that a URL must match with for this filter to
51+
* be applied.
52+
*
53+
* @var string[]
54+
*/
55+
public $urls;
56+
57+
/**
58+
* Required. The action taken when this filter is applied.
59+
*
60+
* Accepted values: URL_FILTERING_ACTION_UNSPECIFIED, ALLOW, DENY
61+
*
62+
* @param self::FILTERING_ACTION_* $filteringAction
63+
*/
64+
public function setFilteringAction($filteringAction)
65+
{
66+
$this->filteringAction = $filteringAction;
67+
}
68+
/**
69+
* @return self::FILTERING_ACTION_*
70+
*/
71+
public function getFilteringAction()
72+
{
73+
return $this->filteringAction;
74+
}
75+
/**
76+
* Required. The priority of this filter within the URL Filtering Profile.
77+
* Lower integers indicate higher priorities. The priority of a filter must be
78+
* unique within a URL Filtering Profile.
79+
*
80+
* @param int $priority
81+
*/
82+
public function setPriority($priority)
83+
{
84+
$this->priority = $priority;
85+
}
86+
/**
87+
* @return int
88+
*/
89+
public function getPriority()
90+
{
91+
return $this->priority;
92+
}
93+
/**
94+
* Required. The list of strings that a URL must match with for this filter to
95+
* be applied.
96+
*
97+
* @param string[] $urls
98+
*/
99+
public function setUrls($urls)
100+
{
101+
$this->urls = $urls;
102+
}
103+
/**
104+
* @return string[]
105+
*/
106+
public function getUrls()
107+
{
108+
return $this->urls;
109+
}
110+
}
111+
112+
// Adding a class alias for backwards compatibility with the previous class name.
113+
class_alias(UrlFilter::class, 'Google_Service_NetworkSecurity_UrlFilter');
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
18+
namespace Google\Service\NetworkSecurity;
19+
20+
class UrlFilteringProfile extends \Google\Collection
21+
{
22+
protected $collection_key = 'urlFilters';
23+
protected $urlFiltersType = UrlFilter::class;
24+
protected $urlFiltersDataType = 'array';
25+
26+
/**
27+
* Optional. The list of filtering configs in which each config defines an
28+
* action to take for some URL match.
29+
*
30+
* @param UrlFilter[] $urlFilters
31+
*/
32+
public function setUrlFilters($urlFilters)
33+
{
34+
$this->urlFilters = $urlFilters;
35+
}
36+
/**
37+
* @return UrlFilter[]
38+
*/
39+
public function getUrlFilters()
40+
{
41+
return $this->urlFilters;
42+
}
43+
}
44+
45+
// Adding a class alias for backwards compatibility with the previous class name.
46+
class_alias(UrlFilteringProfile::class, 'Google_Service_NetworkSecurity_UrlFilteringProfile');

0 commit comments

Comments
 (0)