Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/NetworkSecurity/SecurityProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class SecurityProfile extends \Google\Model
* Profile type for TPPI.
*/
public const TYPE_CUSTOM_INTERCEPT = 'CUSTOM_INTERCEPT';
/**
* Profile type for URL filtering.
*/
public const TYPE_URL_FILTERING = 'URL_FILTERING';
/**
* Output only. Resource creation timestamp.
*
Expand Down Expand Up @@ -89,6 +93,8 @@ class SecurityProfile extends \Google\Model
* @var string
*/
public $updateTime;
protected $urlFilteringProfileType = UrlFilteringProfile::class;
protected $urlFilteringProfileDataType = '';

/**
* Output only. Resource creation timestamp.
Expand Down Expand Up @@ -228,7 +234,7 @@ public function getThreatPreventionProfile()
* configures.
*
* Accepted values: PROFILE_TYPE_UNSPECIFIED, THREAT_PREVENTION,
* CUSTOM_MIRRORING, CUSTOM_INTERCEPT
* CUSTOM_MIRRORING, CUSTOM_INTERCEPT, URL_FILTERING
*
* @param self::TYPE_* $type
*/
Expand Down Expand Up @@ -259,6 +265,22 @@ public function getUpdateTime()
{
return $this->updateTime;
}
/**
* The URL filtering configuration for the SecurityProfile.
*
* @param UrlFilteringProfile $urlFilteringProfile
*/
public function setUrlFilteringProfile(UrlFilteringProfile $urlFilteringProfile)
{
$this->urlFilteringProfile = $urlFilteringProfile;
}
/**
* @return UrlFilteringProfile
*/
public function getUrlFilteringProfile()
{
return $this->urlFilteringProfile;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
Expand Down
24 changes: 24 additions & 0 deletions src/NetworkSecurity/SecurityProfileGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ class SecurityProfileGroup extends \Google\Model
* @var string
*/
public $updateTime;
/**
* Optional. Reference to a SecurityProfile with the UrlFiltering
* configuration.
*
* @var string
*/
public $urlFilteringProfile;

/**
* Output only. Resource creation timestamp.
Expand Down Expand Up @@ -258,6 +265,23 @@ public function getUpdateTime()
{
return $this->updateTime;
}
/**
* Optional. Reference to a SecurityProfile with the UrlFiltering
* configuration.
*
* @param string $urlFilteringProfile
*/
public function setUrlFilteringProfile($urlFilteringProfile)
{
$this->urlFilteringProfile = $urlFilteringProfile;
}
/**
* @return string
*/
public function getUrlFilteringProfile()
{
return $this->urlFilteringProfile;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
Expand Down
113 changes: 113 additions & 0 deletions src/NetworkSecurity/UrlFilter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

namespace Google\Service\NetworkSecurity;

class UrlFilter extends \Google\Collection
{
/**
* Filtering action not specified.
*/
public const FILTERING_ACTION_URL_FILTERING_ACTION_UNSPECIFIED = 'URL_FILTERING_ACTION_UNSPECIFIED';
/**
* The connection matching this filter will be allowed to transmit.
*/
public const FILTERING_ACTION_ALLOW = 'ALLOW';
/**
* The connection matching this filter will be dropped.
*/
public const FILTERING_ACTION_DENY = 'DENY';
protected $collection_key = 'urls';
/**
* Required. The action taken when this filter is applied.
*
* @var string
*/
public $filteringAction;
/**
* Required. The priority of this filter within the URL Filtering Profile.
* Lower integers indicate higher priorities. The priority of a filter must be
* unique within a URL Filtering Profile.
*
* @var int
*/
public $priority;
/**
* Required. The list of strings that a URL must match with for this filter to
* be applied.
*
* @var string[]
*/
public $urls;

/**
* Required. The action taken when this filter is applied.
*
* Accepted values: URL_FILTERING_ACTION_UNSPECIFIED, ALLOW, DENY
*
* @param self::FILTERING_ACTION_* $filteringAction
*/
public function setFilteringAction($filteringAction)
{
$this->filteringAction = $filteringAction;
}
/**
* @return self::FILTERING_ACTION_*
*/
public function getFilteringAction()
{
return $this->filteringAction;
}
/**
* Required. The priority of this filter within the URL Filtering Profile.
* Lower integers indicate higher priorities. The priority of a filter must be
* unique within a URL Filtering Profile.
*
* @param int $priority
*/
public function setPriority($priority)
{
$this->priority = $priority;
}
/**
* @return int
*/
public function getPriority()
{
return $this->priority;
}
/**
* Required. The list of strings that a URL must match with for this filter to
* be applied.
*
* @param string[] $urls
*/
public function setUrls($urls)
{
$this->urls = $urls;
}
/**
* @return string[]
*/
public function getUrls()
{
return $this->urls;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UrlFilter::class, 'Google_Service_NetworkSecurity_UrlFilter');
46 changes: 46 additions & 0 deletions src/NetworkSecurity/UrlFilteringProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

namespace Google\Service\NetworkSecurity;

class UrlFilteringProfile extends \Google\Collection
{
protected $collection_key = 'urlFilters';
protected $urlFiltersType = UrlFilter::class;
protected $urlFiltersDataType = 'array';

/**
* Optional. The list of filtering configs in which each config defines an
* action to take for some URL match.
*
* @param UrlFilter[] $urlFilters
*/
public function setUrlFilters($urlFilters)
{
$this->urlFilters = $urlFilters;
}
/**
* @return UrlFilter[]
*/
public function getUrlFilters()
{
return $this->urlFilters;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UrlFilteringProfile::class, 'Google_Service_NetworkSecurity_UrlFilteringProfile');