gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,68 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2AlternatePolicySpec extends \Google\Model
{
/**
* Reference to the launch that will be used while audit logging and to
* control the launch. Set only in the alternate policy.
*
* @var string
*/
public $launch;
protected $specType = GoogleCloudOrgpolicyV2PolicySpec::class;
protected $specDataType = '';
/**
* Reference to the launch that will be used while audit logging and to
* control the launch. Set only in the alternate policy.
*
* @param string $launch
*/
public function setLaunch($launch)
{
$this->launch = $launch;
}
/**
* @return string
*/
public function getLaunch()
{
return $this->launch;
}
/**
* Specify constraint for configurations of Google Cloud resources.
*
* @param GoogleCloudOrgpolicyV2PolicySpec $spec
*/
public function setSpec(GoogleCloudOrgpolicyV2PolicySpec $spec)
{
$this->spec = $spec;
}
/**
* @return GoogleCloudOrgpolicyV2PolicySpec
*/
public function getSpec()
{
return $this->spec;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2AlternatePolicySpec::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2AlternatePolicySpec');
@@ -0,0 +1,253 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2Constraint extends \Google\Model
{
/**
* This is only used for distinguishing unset values, and results in an error
* if set.
*/
public const CONSTRAINT_DEFAULT_CONSTRAINT_DEFAULT_UNSPECIFIED = 'CONSTRAINT_DEFAULT_UNSPECIFIED';
/**
* Indicate that all values are allowed for list constraints. Indicate that
* enforcement is off for boolean constraints.
*/
public const CONSTRAINT_DEFAULT_ALLOW = 'ALLOW';
/**
* Indicate that all values are denied for list constraints. Indicate that
* enforcement is on for boolean constraints.
*/
public const CONSTRAINT_DEFAULT_DENY = 'DENY';
protected $booleanConstraintType = GoogleCloudOrgpolicyV2ConstraintBooleanConstraint::class;
protected $booleanConstraintDataType = '';
/**
* The evaluation behavior of this constraint in the absence of a policy.
*
* @var string
*/
public $constraintDefault;
/**
* Detailed description of what this constraint controls as well as how and
* where it is enforced. Mutable.
*
* @var string
*/
public $description;
/**
* The human readable name. Mutable.
*
* @var string
*/
public $displayName;
/**
* Defines the equivalent constraint name, if it exists. Managed constraints
* can have an equivalent legacy managed constraint, and legacy managed
* constraints can have an equivalent managed constraint. For example,
* "constraints/iam.disableServiceAccountKeyUpload" is equivalent to
* "constraints/iam.managed.disableServiceAccountKeyUpload".
*
* @var string
*/
public $equivalentConstraint;
protected $listConstraintType = GoogleCloudOrgpolicyV2ConstraintListConstraint::class;
protected $listConstraintDataType = '';
/**
* Immutable. The resource name of the constraint. Must be in one of the
* following forms: *
* `projects/{project_number}/constraints/{constraint_name}` *
* `folders/{folder_id}/constraints/{constraint_name}` *
* `organizations/{organization_id}/constraints/{constraint_name}` For
* example, "/projects/123/constraints/compute.disableSerialPortAccess".
*
* @var string
*/
public $name;
/**
* Shows if dry run is supported for this constraint or not.
*
* @var bool
*/
public $supportsDryRun;
/**
* Shows if simulation is supported for this constraint or not.
*
* @var bool
*/
public $supportsSimulation;
/**
* Defines this constraint as being a boolean constraint.
*
* @param GoogleCloudOrgpolicyV2ConstraintBooleanConstraint $booleanConstraint
*/
public function setBooleanConstraint(GoogleCloudOrgpolicyV2ConstraintBooleanConstraint $booleanConstraint)
{
$this->booleanConstraint = $booleanConstraint;
}
/**
* @return GoogleCloudOrgpolicyV2ConstraintBooleanConstraint
*/
public function getBooleanConstraint()
{
return $this->booleanConstraint;
}
/**
* The evaluation behavior of this constraint in the absence of a policy.
*
* Accepted values: CONSTRAINT_DEFAULT_UNSPECIFIED, ALLOW, DENY
*
* @param self::CONSTRAINT_DEFAULT_* $constraintDefault
*/
public function setConstraintDefault($constraintDefault)
{
$this->constraintDefault = $constraintDefault;
}
/**
* @return self::CONSTRAINT_DEFAULT_*
*/
public function getConstraintDefault()
{
return $this->constraintDefault;
}
/**
* Detailed description of what this constraint controls as well as how and
* where it is enforced. Mutable.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* The human readable name. Mutable.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Defines the equivalent constraint name, if it exists. Managed constraints
* can have an equivalent legacy managed constraint, and legacy managed
* constraints can have an equivalent managed constraint. For example,
* "constraints/iam.disableServiceAccountKeyUpload" is equivalent to
* "constraints/iam.managed.disableServiceAccountKeyUpload".
*
* @param string $equivalentConstraint
*/
public function setEquivalentConstraint($equivalentConstraint)
{
$this->equivalentConstraint = $equivalentConstraint;
}
/**
* @return string
*/
public function getEquivalentConstraint()
{
return $this->equivalentConstraint;
}
/**
* Defines this constraint as being a list constraint.
*
* @param GoogleCloudOrgpolicyV2ConstraintListConstraint $listConstraint
*/
public function setListConstraint(GoogleCloudOrgpolicyV2ConstraintListConstraint $listConstraint)
{
$this->listConstraint = $listConstraint;
}
/**
* @return GoogleCloudOrgpolicyV2ConstraintListConstraint
*/
public function getListConstraint()
{
return $this->listConstraint;
}
/**
* Immutable. The resource name of the constraint. Must be in one of the
* following forms: *
* `projects/{project_number}/constraints/{constraint_name}` *
* `folders/{folder_id}/constraints/{constraint_name}` *
* `organizations/{organization_id}/constraints/{constraint_name}` For
* example, "/projects/123/constraints/compute.disableSerialPortAccess".
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Shows if dry run is supported for this constraint or not.
*
* @param bool $supportsDryRun
*/
public function setSupportsDryRun($supportsDryRun)
{
$this->supportsDryRun = $supportsDryRun;
}
/**
* @return bool
*/
public function getSupportsDryRun()
{
return $this->supportsDryRun;
}
/**
* Shows if simulation is supported for this constraint or not.
*
* @param bool $supportsSimulation
*/
public function setSupportsSimulation($supportsSimulation)
{
$this->supportsSimulation = $supportsSimulation;
}
/**
* @return bool
*/
public function getSupportsSimulation()
{
return $this->supportsSimulation;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2Constraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2Constraint');
@@ -0,0 +1,44 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintBooleanConstraint extends \Google\Model
{
protected $customConstraintDefinitionType = GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition::class;
protected $customConstraintDefinitionDataType = '';
/**
* Custom constraint definition. Defines this as a managed constraint.
*
* @param GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition $customConstraintDefinition
*/
public function setCustomConstraintDefinition(GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition $customConstraintDefinition)
{
$this->customConstraintDefinition = $customConstraintDefinition;
}
/**
* @return GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
*/
public function getCustomConstraintDefinition()
{
return $this->customConstraintDefinition;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintBooleanConstraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintBooleanConstraint');
@@ -0,0 +1,157 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition extends \Google\Collection
{
/**
* This is only used for distinguishing unset values, and results in an error
* if used.
*/
public const ACTION_TYPE_ACTION_TYPE_UNSPECIFIED = 'ACTION_TYPE_UNSPECIFIED';
/**
* Allowed action type.
*/
public const ACTION_TYPE_ALLOW = 'ALLOW';
/**
* Deny action type.
*/
public const ACTION_TYPE_DENY = 'DENY';
protected $collection_key = 'resourceTypes';
/**
* Allow or deny type.
*
* @var string
*/
public $actionType;
/**
* Org policy condition/expression. For example:
* `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or,
* `resource.management.auto_upgrade == true` The max length of the condition
* is 1000 characters.
*
* @var string
*/
public $condition;
/**
* All the operations being applied for this constraint.
*
* @var string[]
*/
public $methodTypes;
protected $parametersType = GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter::class;
protected $parametersDataType = 'map';
/**
* The resource instance type that this policy applies to, in the format `/`.
* Example: * `compute.googleapis.com/Instance`.
*
* @var string[]
*/
public $resourceTypes;
/**
* Allow or deny type.
*
* Accepted values: ACTION_TYPE_UNSPECIFIED, ALLOW, DENY
*
* @param self::ACTION_TYPE_* $actionType
*/
public function setActionType($actionType)
{
$this->actionType = $actionType;
}
/**
* @return self::ACTION_TYPE_*
*/
public function getActionType()
{
return $this->actionType;
}
/**
* Org policy condition/expression. For example:
* `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or,
* `resource.management.auto_upgrade == true` The max length of the condition
* is 1000 characters.
*
* @param string $condition
*/
public function setCondition($condition)
{
$this->condition = $condition;
}
/**
* @return string
*/
public function getCondition()
{
return $this->condition;
}
/**
* All the operations being applied for this constraint.
*
* @param string[] $methodTypes
*/
public function setMethodTypes($methodTypes)
{
$this->methodTypes = $methodTypes;
}
/**
* @return string[]
*/
public function getMethodTypes()
{
return $this->methodTypes;
}
/**
* Stores the structure of `Parameters` used by the constraint condition. The
* key of `map` represents the name of the parameter.
*
* @param GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter[] $parameters
*/
public function setParameters($parameters)
{
$this->parameters = $parameters;
}
/**
* @return GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter[]
*/
public function getParameters()
{
return $this->parameters;
}
/**
* The resource instance type that this policy applies to, in the format `/`.
* Example: * `compute.googleapis.com/Instance`.
*
* @param string[] $resourceTypes
*/
public function setResourceTypes($resourceTypes)
{
$this->resourceTypes = $resourceTypes;
}
/**
* @return string[]
*/
public function getResourceTypes()
{
return $this->resourceTypes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition');
@@ -0,0 +1,177 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter extends \Google\Model
{
/**
* This is only used for distinguishing unset values, and results in an error
* if used.
*/
public const ITEM_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
/**
* List parameter type.
*/
public const ITEM_LIST = 'LIST';
/**
* String parameter type.
*/
public const ITEM_STRING = 'STRING';
/**
* Boolean parameter type.
*/
public const ITEM_BOOLEAN = 'BOOLEAN';
/**
* This is only used for distinguishing unset values, and results in an error
* if used.
*/
public const TYPE_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
/**
* List parameter type.
*/
public const TYPE_LIST = 'LIST';
/**
* String parameter type.
*/
public const TYPE_STRING = 'STRING';
/**
* Boolean parameter type.
*/
public const TYPE_BOOLEAN = 'BOOLEAN';
/**
* Sets the value of the parameter in an assignment if no value is given.
*
* @var array
*/
public $defaultValue;
/**
* Determines the parameter's value structure. For example, `LIST` can be
* specified by defining `type: LIST`, and `item: STRING`.
*
* @var string
*/
public $item;
protected $metadataType = GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata::class;
protected $metadataDataType = '';
/**
* Type of the parameter.
*
* @var string
*/
public $type;
/**
* Provides a CEL expression to specify the acceptable parameter values during
* assignment. For example, parameterName in ("parameterValue1",
* "parameterValue2").
*
* @var string
*/
public $validValuesExpr;
/**
* Sets the value of the parameter in an assignment if no value is given.
*
* @param array $defaultValue
*/
public function setDefaultValue($defaultValue)
{
$this->defaultValue = $defaultValue;
}
/**
* @return array
*/
public function getDefaultValue()
{
return $this->defaultValue;
}
/**
* Determines the parameter's value structure. For example, `LIST` can be
* specified by defining `type: LIST`, and `item: STRING`.
*
* Accepted values: TYPE_UNSPECIFIED, LIST, STRING, BOOLEAN
*
* @param self::ITEM_* $item
*/
public function setItem($item)
{
$this->item = $item;
}
/**
* @return self::ITEM_*
*/
public function getItem()
{
return $this->item;
}
/**
* Defines subproperties primarily used by the UI to display user-friendly
* information.
*
* @param GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata $metadata
*/
public function setMetadata(GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata $metadata)
{
$this->metadata = $metadata;
}
/**
* @return GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* Type of the parameter.
*
* Accepted values: TYPE_UNSPECIFIED, LIST, STRING, BOOLEAN
*
* @param self::TYPE_* $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return self::TYPE_*
*/
public function getType()
{
return $this->type;
}
/**
* Provides a CEL expression to specify the acceptable parameter values during
* assignment. For example, parameterName in ("parameterValue1",
* "parameterValue2").
*
* @param string $validValuesExpr
*/
public function setValidValuesExpr($validValuesExpr)
{
$this->validValuesExpr = $validValuesExpr;
}
/**
* @return string
*/
public function getValidValuesExpr()
{
return $this->validValuesExpr;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter');
@@ -0,0 +1,48 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata extends \Google\Model
{
/**
* Detailed description of what this `parameter` is and its use. Mutable.
*
* @var string
*/
public $description;
/**
* Detailed description of what this `parameter` is and its use. Mutable.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameterMetadata');
@@ -0,0 +1,99 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint extends \Google\Collection
{
protected $collection_key = 'resourceTypes';
/**
* @var string
*/
public $actionType;
/**
* @var string
*/
public $condition;
/**
* @var string[]
*/
public $methodTypes;
/**
* @var string[]
*/
public $resourceTypes;
/**
* @param string
*/
public function setActionType($actionType)
{
$this->actionType = $actionType;
}
/**
* @return string
*/
public function getActionType()
{
return $this->actionType;
}
/**
* @param string
*/
public function setCondition($condition)
{
$this->condition = $condition;
}
/**
* @return string
*/
public function getCondition()
{
return $this->condition;
}
/**
* @param string[]
*/
public function setMethodTypes($methodTypes)
{
$this->methodTypes = $methodTypes;
}
/**
* @return string[]
*/
public function getMethodTypes()
{
return $this->methodTypes;
}
/**
* @param string[]
*/
public function setResourceTypes($resourceTypes)
{
$this->resourceTypes = $resourceTypes;
}
/**
* @return string[]
*/
public function getResourceTypes()
{
return $this->resourceTypes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint');
@@ -0,0 +1,99 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintGoogleManagedConstraint extends \Google\Collection
{
protected $collection_key = 'resourceTypes';
/**
* @var string
*/
public $actionType;
/**
* @var string
*/
public $condition;
/**
* @var string[]
*/
public $methodTypes;
/**
* @var string[]
*/
public $resourceTypes;
/**
* @param string
*/
public function setActionType($actionType)
{
$this->actionType = $actionType;
}
/**
* @return string
*/
public function getActionType()
{
return $this->actionType;
}
/**
* @param string
*/
public function setCondition($condition)
{
$this->condition = $condition;
}
/**
* @return string
*/
public function getCondition()
{
return $this->condition;
}
/**
* @param string[]
*/
public function setMethodTypes($methodTypes)
{
$this->methodTypes = $methodTypes;
}
/**
* @return string[]
*/
public function getMethodTypes()
{
return $this->methodTypes;
}
/**
* @param string[]
*/
public function setResourceTypes($resourceTypes)
{
$this->resourceTypes = $resourceTypes;
}
/**
* @return string[]
*/
public function getResourceTypes()
{
return $this->resourceTypes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintGoogleManagedConstraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintGoogleManagedConstraint');
@@ -0,0 +1,80 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ConstraintListConstraint extends \Google\Model
{
/**
* Indicates whether values grouped into categories can be used in
* `Policy.allowed_values` and `Policy.denied_values`. For example,
* `"in:Python"` would match any value in the 'Python' group.
*
* @var bool
*/
public $supportsIn;
/**
* Indicates whether subtrees of the Resource Manager resource hierarchy can
* be used in `Policy.allowed_values` and `Policy.denied_values`. For example,
* `"under:folders/123"` would match any resource under the 'folders/123'
* folder.
*
* @var bool
*/
public $supportsUnder;
/**
* Indicates whether values grouped into categories can be used in
* `Policy.allowed_values` and `Policy.denied_values`. For example,
* `"in:Python"` would match any value in the 'Python' group.
*
* @param bool $supportsIn
*/
public function setSupportsIn($supportsIn)
{
$this->supportsIn = $supportsIn;
}
/**
* @return bool
*/
public function getSupportsIn()
{
return $this->supportsIn;
}
/**
* Indicates whether subtrees of the Resource Manager resource hierarchy can
* be used in `Policy.allowed_values` and `Policy.denied_values`. For example,
* `"under:folders/123"` would match any resource under the 'folders/123'
* folder.
*
* @param bool $supportsUnder
*/
public function setSupportsUnder($supportsUnder)
{
$this->supportsUnder = $supportsUnder;
}
/**
* @return bool
*/
public function getSupportsUnder()
{
return $this->supportsUnder;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ConstraintListConstraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ConstraintListConstraint');
@@ -0,0 +1,248 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2CustomConstraint extends \Google\Collection
{
/**
* This is only used for distinguishing unset values, and results in an error
* if used.
*/
public const ACTION_TYPE_ACTION_TYPE_UNSPECIFIED = 'ACTION_TYPE_UNSPECIFIED';
/**
* Allowed action type.
*/
public const ACTION_TYPE_ALLOW = 'ALLOW';
/**
* Deny action type.
*/
public const ACTION_TYPE_DENY = 'DENY';
protected $collection_key = 'resourceTypes';
/**
* Allow or deny type.
*
* @var string
*/
public $actionType;
/**
* A Common Expression Language (CEL) condition which is used in the
* evaluation of the constraint. For example:
* `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or,
* `resource.management.auto_upgrade == true` The max length of the condition
* is 1000 characters.
*
* @var string
*/
public $condition;
/**
* Detailed information about this custom policy constraint. The max length of
* the description is 2000 characters.
*
* @var string
*/
public $description;
/**
* One line display name for the UI. The max length of the display_name is 200
* characters.
*
* @var string
*/
public $displayName;
/**
* All the operations being applied for this constraint.
*
* @var string[]
*/
public $methodTypes;
/**
* Immutable. Name of the constraint. This is unique within the organization.
* The name must be of the form: *
* `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
* Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
* The max length is 71 characters and the minimum length is 1. Note that the
* prefix `organizations/{organization_id}/customConstraints/custom.` is not
* counted.
*
* @var string
*/
public $name;
/**
* Immutable. The resource instance type on which this policy applies. Format
* will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
*
* @var string[]
*/
public $resourceTypes;
/**
* Output only. The last time this custom constraint was updated. This
* represents the last time that the `CreateCustomConstraint` or
* `UpdateCustomConstraint` methods were called.
*
* @var string
*/
public $updateTime;
/**
* Allow or deny type.
*
* Accepted values: ACTION_TYPE_UNSPECIFIED, ALLOW, DENY
*
* @param self::ACTION_TYPE_* $actionType
*/
public function setActionType($actionType)
{
$this->actionType = $actionType;
}
/**
* @return self::ACTION_TYPE_*
*/
public function getActionType()
{
return $this->actionType;
}
/**
* A Common Expression Language (CEL) condition which is used in the
* evaluation of the constraint. For example:
* `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or,
* `resource.management.auto_upgrade == true` The max length of the condition
* is 1000 characters.
*
* @param string $condition
*/
public function setCondition($condition)
{
$this->condition = $condition;
}
/**
* @return string
*/
public function getCondition()
{
return $this->condition;
}
/**
* Detailed information about this custom policy constraint. The max length of
* the description is 2000 characters.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* One line display name for the UI. The max length of the display_name is 200
* characters.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* All the operations being applied for this constraint.
*
* @param string[] $methodTypes
*/
public function setMethodTypes($methodTypes)
{
$this->methodTypes = $methodTypes;
}
/**
* @return string[]
*/
public function getMethodTypes()
{
return $this->methodTypes;
}
/**
* Immutable. Name of the constraint. This is unique within the organization.
* The name must be of the form: *
* `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
* Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
* The max length is 71 characters and the minimum length is 1. Note that the
* prefix `organizations/{organization_id}/customConstraints/custom.` is not
* counted.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Immutable. The resource instance type on which this policy applies. Format
* will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
*
* @param string[] $resourceTypes
*/
public function setResourceTypes($resourceTypes)
{
$this->resourceTypes = $resourceTypes;
}
/**
* @return string[]
*/
public function getResourceTypes()
{
return $this->resourceTypes;
}
/**
* Output only. The last time this custom constraint was updated. This
* represents the last time that the `CreateCustomConstraint` or
* `UpdateCustomConstraint` methods were called.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2CustomConstraint::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2CustomConstraint');
@@ -0,0 +1,67 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ListConstraintsResponse extends \Google\Collection
{
protected $collection_key = 'constraints';
protected $constraintsType = GoogleCloudOrgpolicyV2Constraint::class;
protected $constraintsDataType = 'array';
/**
* Page token used to retrieve the next page. This is not used.
*
* @var string
*/
public $nextPageToken;
/**
* The collection of constraints that are available on the targeted resource.
*
* @param GoogleCloudOrgpolicyV2Constraint[] $constraints
*/
public function setConstraints($constraints)
{
$this->constraints = $constraints;
}
/**
* @return GoogleCloudOrgpolicyV2Constraint[]
*/
public function getConstraints()
{
return $this->constraints;
}
/**
* Page token used to retrieve the next page. This is not used.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ListConstraintsResponse::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ListConstraintsResponse');
@@ -0,0 +1,70 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ListCustomConstraintsResponse extends \Google\Collection
{
protected $collection_key = 'customConstraints';
protected $customConstraintsType = GoogleCloudOrgpolicyV2CustomConstraint::class;
protected $customConstraintsDataType = 'array';
/**
* Page token used to retrieve the next page. This is not used, but the server
* may at any point start supplying a valid token.
*
* @var string
*/
public $nextPageToken;
/**
* All custom and managed constraints that exist on the organization resource.
* It will be empty if no custom constraints are set.
*
* @param GoogleCloudOrgpolicyV2CustomConstraint[] $customConstraints
*/
public function setCustomConstraints($customConstraints)
{
$this->customConstraints = $customConstraints;
}
/**
* @return GoogleCloudOrgpolicyV2CustomConstraint[]
*/
public function getCustomConstraints()
{
return $this->customConstraints;
}
/**
* Page token used to retrieve the next page. This is not used, but the server
* may at any point start supplying a valid token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ListCustomConstraintsResponse::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ListCustomConstraintsResponse');
@@ -0,0 +1,70 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2ListPoliciesResponse extends \Google\Collection
{
protected $collection_key = 'policies';
/**
* Page token used to retrieve the next page. This is not used, but the server
* may at any point start supplying a valid token.
*
* @var string
*/
public $nextPageToken;
protected $policiesType = GoogleCloudOrgpolicyV2Policy::class;
protected $policiesDataType = 'array';
/**
* Page token used to retrieve the next page. This is not used, but the server
* may at any point start supplying a valid token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* All policies that exist on the resource. It will be empty if no policies
* are set.
*
* @param GoogleCloudOrgpolicyV2Policy[] $policies
*/
public function setPolicies($policies)
{
$this->policies = $policies;
}
/**
* @return GoogleCloudOrgpolicyV2Policy[]
*/
public function getPolicies()
{
return $this->policies;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2ListPoliciesResponse::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2ListPoliciesResponse');
@@ -0,0 +1,149 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2Policy extends \Google\Model
{
protected $alternateType = GoogleCloudOrgpolicyV2AlternatePolicySpec::class;
protected $alternateDataType = '';
protected $dryRunSpecType = GoogleCloudOrgpolicyV2PolicySpec::class;
protected $dryRunSpecDataType = '';
/**
* Optional. An opaque tag indicating the current state of the policy, used
* for concurrency control. This entity tag (ETag) is computed by the server
* based on the value of other fields, and may be sent on update and delete
* requests to ensure the client has an up-to-date value before proceeding.
*
* @var string
*/
public $etag;
/**
* Immutable. The resource name of the policy. Must be one of the following
* forms, where `constraint_name` is the name of the constraint that this
* policy configures: * `projects/{project_number}/policies/{constraint_name}`
* * `folders/{folder_id}/policies/{constraint_name}` *
* `organizations/{organization_id}/policies/{constraint_name}` For example,
* `projects/123/policies/compute.disableSerialPortAccess`. Note:
* `projects/{project_id}/policies/{constraint_name}` is also an acceptable
* name for API requests, but responses will return the name using the
* equivalent project number.
*
* @var string
*/
public $name;
protected $specType = GoogleCloudOrgpolicyV2PolicySpec::class;
protected $specDataType = '';
/**
* Deprecated.
*
* @deprecated
* @param GoogleCloudOrgpolicyV2AlternatePolicySpec $alternate
*/
public function setAlternate(GoogleCloudOrgpolicyV2AlternatePolicySpec $alternate)
{
$this->alternate = $alternate;
}
/**
* @deprecated
* @return GoogleCloudOrgpolicyV2AlternatePolicySpec
*/
public function getAlternate()
{
return $this->alternate;
}
/**
* Dry-run policy. Audit-only policy, can be used to monitor how the policy
* would have impacted the existing and future resources if it's enforced.
*
* @param GoogleCloudOrgpolicyV2PolicySpec $dryRunSpec
*/
public function setDryRunSpec(GoogleCloudOrgpolicyV2PolicySpec $dryRunSpec)
{
$this->dryRunSpec = $dryRunSpec;
}
/**
* @return GoogleCloudOrgpolicyV2PolicySpec
*/
public function getDryRunSpec()
{
return $this->dryRunSpec;
}
/**
* Optional. An opaque tag indicating the current state of the policy, used
* for concurrency control. This entity tag (ETag) is computed by the server
* based on the value of other fields, and may be sent on update and delete
* requests to ensure the client has an up-to-date value before proceeding.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Immutable. The resource name of the policy. Must be one of the following
* forms, where `constraint_name` is the name of the constraint that this
* policy configures: * `projects/{project_number}/policies/{constraint_name}`
* * `folders/{folder_id}/policies/{constraint_name}` *
* `organizations/{organization_id}/policies/{constraint_name}` For example,
* `projects/123/policies/compute.disableSerialPortAccess`. Note:
* `projects/{project_id}/policies/{constraint_name}` is also an acceptable
* name for API requests, but responses will return the name using the
* equivalent project number.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Basic information about the organization policy.
*
* @param GoogleCloudOrgpolicyV2PolicySpec $spec
*/
public function setSpec(GoogleCloudOrgpolicyV2PolicySpec $spec)
{
$this->spec = $spec;
}
/**
* @return GoogleCloudOrgpolicyV2PolicySpec
*/
public function getSpec()
{
return $this->spec;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2Policy::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2Policy');
@@ -0,0 +1,171 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2PolicySpec extends \Google\Collection
{
protected $collection_key = 'rules';
/**
* An opaque tag indicating the current version of the policySpec, used for
* concurrency control. This field is ignored if used in a `CreatePolicy`
* request. When the policy is returned from either a `GetPolicy` or a
* `ListPolicies` request, this entity tag (ETag) indicates the version of the
* current policySpec to use when executing a read-modify-write loop. When the
* policy is returned from a `GetEffectivePolicy` request, the ETag will be
* unset.
*
* @var string
*/
public $etag;
/**
* Determines the inheritance behavior for this policy. If
* `inherit_from_parent` is true, policy rules set higher up in the hierarchy
* (up to the closest root) are inherited and present in the effective policy.
* If it is false, then no rules are inherited, and this policy becomes the
* new root for evaluation. This field can be set only for policies that
* configure list constraints.
*
* @var bool
*/
public $inheritFromParent;
/**
* Ignores policies set above this resource and restores the
* `constraint_default` enforcement behavior of the specific constraint at
* this resource. This field can be set in policies for either list or boolean
* constraints. If set, `rules` must be empty and `inherit_from_parent` must
* be set to false.
*
* @var bool
*/
public $reset;
protected $rulesType = GoogleCloudOrgpolicyV2PolicySpecPolicyRule::class;
protected $rulesDataType = 'array';
/**
* Output only. The time stamp this was previously updated. This represents
* the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that
* policy.
*
* @var string
*/
public $updateTime;
/**
* An opaque tag indicating the current version of the policySpec, used for
* concurrency control. This field is ignored if used in a `CreatePolicy`
* request. When the policy is returned from either a `GetPolicy` or a
* `ListPolicies` request, this entity tag (ETag) indicates the version of the
* current policySpec to use when executing a read-modify-write loop. When the
* policy is returned from a `GetEffectivePolicy` request, the ETag will be
* unset.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Determines the inheritance behavior for this policy. If
* `inherit_from_parent` is true, policy rules set higher up in the hierarchy
* (up to the closest root) are inherited and present in the effective policy.
* If it is false, then no rules are inherited, and this policy becomes the
* new root for evaluation. This field can be set only for policies that
* configure list constraints.
*
* @param bool $inheritFromParent
*/
public function setInheritFromParent($inheritFromParent)
{
$this->inheritFromParent = $inheritFromParent;
}
/**
* @return bool
*/
public function getInheritFromParent()
{
return $this->inheritFromParent;
}
/**
* Ignores policies set above this resource and restores the
* `constraint_default` enforcement behavior of the specific constraint at
* this resource. This field can be set in policies for either list or boolean
* constraints. If set, `rules` must be empty and `inherit_from_parent` must
* be set to false.
*
* @param bool $reset
*/
public function setReset($reset)
{
$this->reset = $reset;
}
/**
* @return bool
*/
public function getReset()
{
return $this->reset;
}
/**
* In policies for boolean constraints, the following requirements apply: -
* There must be exactly one policy rule where a condition is unset. - Boolean
* policy rules with conditions must set `enforced` to the opposite of the
* policy rule without a condition. - During policy evaluation, policy rules
* with conditions that are true for a target resource take precedence.
*
* @param GoogleCloudOrgpolicyV2PolicySpecPolicyRule[] $rules
*/
public function setRules($rules)
{
$this->rules = $rules;
}
/**
* @return GoogleCloudOrgpolicyV2PolicySpecPolicyRule[]
*/
public function getRules()
{
return $this->rules;
}
/**
* Output only. The time stamp this was previously updated. This represents
* the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that
* policy.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2PolicySpec::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2PolicySpec');
@@ -0,0 +1,189 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2PolicySpecPolicyRule extends \Google\Model
{
/**
* Setting this to true means that all values are allowed. This field can be
* set only in policies for list constraints.
*
* @var bool
*/
public $allowAll;
protected $conditionType = GoogleTypeExpr::class;
protected $conditionDataType = '';
/**
* Setting this to true means that all values are denied. This field can be
* set only in policies for list constraints.
*
* @var bool
*/
public $denyAll;
/**
* If `true`, then the policy is enforced. If `false`, then any configuration
* is acceptable. This field can be set in policies for boolean constraints,
* custom constraints and managed constraints.
*
* @var bool
*/
public $enforce;
/**
* Optional. Required for managed constraints if parameters are defined.
* Passes parameter values when policy enforcement is enabled. Ensure that
* parameter value types match those defined in the constraint definition. For
* example: ``` { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" :
* true } ```
*
* @var array[]
*/
public $parameters;
protected $valuesType = GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues::class;
protected $valuesDataType = '';
/**
* Setting this to true means that all values are allowed. This field can be
* set only in policies for list constraints.
*
* @param bool $allowAll
*/
public function setAllowAll($allowAll)
{
$this->allowAll = $allowAll;
}
/**
* @return bool
*/
public function getAllowAll()
{
return $this->allowAll;
}
/**
* A condition that determines whether this rule is used to evaluate the
* policy. When set, the google.type.Expr.expression field must contain 1 to
* 10 subexpressions, joined by the `||` or `&&` operators. Each subexpression
* must use the `resource.matchTag()`, `resource.matchTagId()`,
* `resource.hasTagKey()`, or `resource.hasTagKeyId()` Common Expression
* Language (CEL) function. The `resource.matchTag()` function takes the
* following arguments: * `key_name`: the namespaced name of the tag key, with
* the organization ID and a slash (`/`) as a prefix; for example,
* `123456789012/environment` * `value_name`: the short name of the tag value
* For example: `resource.matchTag('123456789012/environment, 'prod')` The
* `resource.matchTagId()` function takes the following arguments: * `key_id`:
* the permanent ID of the tag key; for example, `tagKeys/123456789012` *
* `value_id`: the permanent ID of the tag value; for example,
* `tagValues/567890123456` For example:
* `resource.matchTagId('tagKeys/123456789012', 'tagValues/567890123456')` The
* `resource.hasTagKey()` function takes the following argument: * `key_name`:
* the namespaced name of the tag key, with the organization ID and a slash
* (`/`) as a prefix; for example, `123456789012/environment` For example:
* `resource.hasTagKey('123456789012/environment')` The
* `resource.hasTagKeyId()` function takes the following arguments: *
* `key_id`: the permanent ID of the tag key; for example,
* `tagKeys/123456789012` For example:
* `resource.hasTagKeyId('tagKeys/123456789012')`
*
* @param GoogleTypeExpr $condition
*/
public function setCondition(GoogleTypeExpr $condition)
{
$this->condition = $condition;
}
/**
* @return GoogleTypeExpr
*/
public function getCondition()
{
return $this->condition;
}
/**
* Setting this to true means that all values are denied. This field can be
* set only in policies for list constraints.
*
* @param bool $denyAll
*/
public function setDenyAll($denyAll)
{
$this->denyAll = $denyAll;
}
/**
* @return bool
*/
public function getDenyAll()
{
return $this->denyAll;
}
/**
* If `true`, then the policy is enforced. If `false`, then any configuration
* is acceptable. This field can be set in policies for boolean constraints,
* custom constraints and managed constraints.
*
* @param bool $enforce
*/
public function setEnforce($enforce)
{
$this->enforce = $enforce;
}
/**
* @return bool
*/
public function getEnforce()
{
return $this->enforce;
}
/**
* Optional. Required for managed constraints if parameters are defined.
* Passes parameter values when policy enforcement is enabled. Ensure that
* parameter value types match those defined in the constraint definition. For
* example: ``` { "allowedLocations" : ["us-east1", "us-west1"], "allowAll" :
* true } ```
*
* @param array[] $parameters
*/
public function setParameters($parameters)
{
$this->parameters = $parameters;
}
/**
* @return array[]
*/
public function getParameters()
{
return $this->parameters;
}
/**
* List of values to be used for this policy rule. This field can be set only
* in policies for list constraints.
*
* @param GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues $values
*/
public function setValues(GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues $values)
{
$this->values = $values;
}
/**
* @return GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
*/
public function getValues()
{
return $this->values;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2PolicySpecPolicyRule::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2PolicySpecPolicyRule');
@@ -0,0 +1,71 @@
<?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\OrgPolicyAPI;
class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues extends \Google\Collection
{
protected $collection_key = 'deniedValues';
/**
* List of values allowed at this resource.
*
* @var string[]
*/
public $allowedValues;
/**
* List of values denied at this resource.
*
* @var string[]
*/
public $deniedValues;
/**
* List of values allowed at this resource.
*
* @param string[] $allowedValues
*/
public function setAllowedValues($allowedValues)
{
$this->allowedValues = $allowedValues;
}
/**
* @return string[]
*/
public function getAllowedValues()
{
return $this->allowedValues;
}
/**
* List of values denied at this resource.
*
* @param string[] $deniedValues
*/
public function setDeniedValues($deniedValues)
{
$this->deniedValues = $deniedValues;
}
/**
* @return string[]
*/
public function getDeniedValues()
{
return $this->deniedValues;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues::class, 'Google_Service_OrgPolicyAPI_GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues');
@@ -0,0 +1,25 @@
<?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\OrgPolicyAPI;
class GoogleProtobufEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleProtobufEmpty::class, 'Google_Service_OrgPolicyAPI_GoogleProtobufEmpty');
@@ -0,0 +1,122 @@
<?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\OrgPolicyAPI;
class GoogleTypeExpr extends \Google\Model
{
/**
* Optional. Description of the expression. This is a longer text which
* describes the expression, e.g. when hovered over it in a UI.
*
* @var string
*/
public $description;
/**
* Textual representation of an expression in Common Expression Language
* syntax.
*
* @var string
*/
public $expression;
/**
* Optional. String indicating the location of the expression for error
* reporting, e.g. a file name and a position in the file.
*
* @var string
*/
public $location;
/**
* Optional. Title for the expression, i.e. a short string describing its
* purpose. This can be used e.g. in UIs which allow to enter the expression.
*
* @var string
*/
public $title;
/**
* Optional. Description of the expression. This is a longer text which
* describes the expression, e.g. when hovered over it in a UI.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Textual representation of an expression in Common Expression Language
* syntax.
*
* @param string $expression
*/
public function setExpression($expression)
{
$this->expression = $expression;
}
/**
* @return string
*/
public function getExpression()
{
return $this->expression;
}
/**
* Optional. String indicating the location of the expression for error
* reporting, e.g. a file name and a position in the file.
*
* @param string $location
*/
public function setLocation($location)
{
$this->location = $location;
}
/**
* @return string
*/
public function getLocation()
{
return $this->location;
}
/**
* Optional. Title for the expression, i.e. a short string describing its
* purpose. This can be used e.g. in UIs which allow to enter the expression.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleTypeExpr::class, 'Google_Service_OrgPolicyAPI_GoogleTypeExpr');
@@ -0,0 +1,33 @@
<?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\OrgPolicyAPI\Resource;
/**
* The "folders" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $folders = $orgpolicyService->folders;
* </code>
*/
class Folders extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Folders::class, 'Google_Service_OrgPolicyAPI_Resource_Folders');
@@ -0,0 +1,58 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListConstraintsResponse;
/**
* The "constraints" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $constraints = $orgpolicyService->folders_constraints;
* </code>
*/
class FoldersConstraints extends \Google\Service\Resource
{
/**
* Lists constraints that could be applied on the specified resource.
* (constraints.listFoldersConstraints)
*
* @param string $parent Required. The Google Cloud resource that parents the
* constraint. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListConstraintsResponse
* @throws \Google\Service\Exception
*/
public function listFoldersConstraints($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListConstraintsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersConstraints::class, 'Google_Service_OrgPolicyAPI_Resource_FoldersConstraints');
@@ -0,0 +1,174 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListPoliciesResponse;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2Policy;
use Google\Service\OrgPolicyAPI\GoogleProtobufEmpty;
/**
* The "policies" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $policies = $orgpolicyService->folders_policies;
* </code>
*/
class FoldersPolicies extends \Google\Service\Resource
{
/**
* Creates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a
* `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy
* already exists on the given Google Cloud resource. (policies.create)
*
* @param string $parent Required. The Google Cloud resource that will parent
* the new policy. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Deletes a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not
* exist. (policies.delete)
*
* @param string $name Required. Name of the policy to delete. See the policy
* entry for naming rules.
* @param array $optParams Optional parameters.
*
* @opt_param string etag Optional. The current entity tag (ETag) of the
* organization policy. If an ETag is provided and doesn't match the current
* ETag of the policy, deletion of the policy will be blocked and an `ABORTED`
* error will be returned.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND`
* is returned. The entity tag (ETag) can be used with `UpdatePolicy()` to
* update a policy during read-modify-write. (policies.get)
*
* @param string $name Required. Resource name of the policy. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Gets the effective policy on a resource. This is the result of merging
* policies in the resource hierarchy and evaluating conditions. The returned
* policy will not have an ETag or `condition` set because it is an evaluated
* policy across multiple resources. Subtrees of Resource Manager resource
* hierarchy with 'under:' prefix will not be expanded.
* (policies.getEffectivePolicy)
*
* @param string $name Required. The effective policy to compute. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function getEffectivePolicy($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getEffectivePolicy', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Retrieves all of the policies that exist on a particular resource.
* (policies.listFoldersPolicies)
*
* @param string $parent Required. The target Google Cloud resource that parents
* the set of constraints and policies that will be returned from this call.
* Must be in one of the following forms: * `projects/{project_number}` *
* `projects/{project_id}` * `folders/{folder_id}` *
* `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListPoliciesResponse
* @throws \Google\Service\Exception
*/
public function listFoldersPolicies($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListPoliciesResponse::class);
}
/**
* Updates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or the policy doesn't exist.
* Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the ETag
* supplied in the request doesn't match the persisted ETag of the policy. Note:
* the supplied policy will perform a full overwrite of all fields.
* (policies.patch)
*
* @param string $name Immutable. The resource name of the policy. Must be one
* of the following forms, where `constraint_name` is the name of the constraint
* that this policy configures: *
* `projects/{project_number}/policies/{constraint_name}` *
* `folders/{folder_id}/policies/{constraint_name}` *
* `organizations/{organization_id}/policies/{constraint_name}` For example,
* `projects/123/policies/compute.disableSerialPortAccess`. Note:
* `projects/{project_id}/policies/{constraint_name}` is also an acceptable name
* for API requests, but responses will return the name using the equivalent
* project number.
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Field mask used to specify the fields to be
* overwritten in the policy. The fields specified in the update_mask are
* relative to the policy, not the full request.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersPolicies::class, 'Google_Service_OrgPolicyAPI_Resource_FoldersPolicies');
@@ -0,0 +1,33 @@
<?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\OrgPolicyAPI\Resource;
/**
* The "organizations" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $organizations = $orgpolicyService->organizations;
* </code>
*/
class Organizations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Organizations::class, 'Google_Service_OrgPolicyAPI_Resource_Organizations');
@@ -0,0 +1,58 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListConstraintsResponse;
/**
* The "constraints" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $constraints = $orgpolicyService->organizations_constraints;
* </code>
*/
class OrganizationsConstraints extends \Google\Service\Resource
{
/**
* Lists constraints that could be applied on the specified resource.
* (constraints.listOrganizationsConstraints)
*
* @param string $parent Required. The Google Cloud resource that parents the
* constraint. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListConstraintsResponse
* @throws \Google\Service\Exception
*/
public function listOrganizationsConstraints($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListConstraintsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsConstraints::class, 'Google_Service_OrgPolicyAPI_Resource_OrganizationsConstraints');
@@ -0,0 +1,135 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2CustomConstraint;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListCustomConstraintsResponse;
use Google\Service\OrgPolicyAPI\GoogleProtobufEmpty;
/**
* The "customConstraints" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $customConstraints = $orgpolicyService->organizations_customConstraints;
* </code>
*/
class OrganizationsCustomConstraints extends \Google\Service\Resource
{
/**
* Creates a custom constraint. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the organization does not exist. Returns a
* `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the constraint
* already exists on the given organization. (customConstraints.create)
*
* @param string $parent Required. Must be in the following form: *
* `organizations/{organization_id}`
* @param GoogleCloudOrgpolicyV2CustomConstraint $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2CustomConstraint
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudOrgpolicyV2CustomConstraint $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudOrgpolicyV2CustomConstraint::class);
}
/**
* Deletes a custom constraint. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint does not exist.
* (customConstraints.delete)
*
* @param string $name Required. Name of the custom constraint to delete. See
* the custom constraint entry for naming rules.
* @param array $optParams Optional parameters.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a custom or managed constraint. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the custom or managed constraint does not
* exist. (customConstraints.get)
*
* @param string $name Required. Resource name of the custom or managed
* constraint. See the custom constraint entry for naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2CustomConstraint
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudOrgpolicyV2CustomConstraint::class);
}
/**
* Retrieves all of the custom constraints that exist on a particular
* organization resource. (customConstraints.listOrganizationsCustomConstraints)
*
* @param string $parent Required. The target Google Cloud resource that parents
* the set of custom constraints that will be returned from this call. Must be
* in one of the following forms: * `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListCustomConstraintsResponse
* @throws \Google\Service\Exception
*/
public function listOrganizationsCustomConstraints($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListCustomConstraintsResponse::class);
}
/**
* Updates a custom constraint. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Note: the
* supplied policy will perform a full overwrite of all fields.
* (customConstraints.patch)
*
* @param string $name Immutable. Name of the constraint. This is unique within
* the organization. The name must be of the form: *
* `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
* Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The
* max length is 71 characters and the minimum length is 1. Note that the prefix
* `organizations/{organization_id}/customConstraints/custom.` is not counted.
* @param GoogleCloudOrgpolicyV2CustomConstraint $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2CustomConstraint
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudOrgpolicyV2CustomConstraint $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudOrgpolicyV2CustomConstraint::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsCustomConstraints::class, 'Google_Service_OrgPolicyAPI_Resource_OrganizationsCustomConstraints');
@@ -0,0 +1,174 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListPoliciesResponse;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2Policy;
use Google\Service\OrgPolicyAPI\GoogleProtobufEmpty;
/**
* The "policies" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $policies = $orgpolicyService->organizations_policies;
* </code>
*/
class OrganizationsPolicies extends \Google\Service\Resource
{
/**
* Creates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a
* `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy
* already exists on the given Google Cloud resource. (policies.create)
*
* @param string $parent Required. The Google Cloud resource that will parent
* the new policy. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Deletes a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not
* exist. (policies.delete)
*
* @param string $name Required. Name of the policy to delete. See the policy
* entry for naming rules.
* @param array $optParams Optional parameters.
*
* @opt_param string etag Optional. The current entity tag (ETag) of the
* organization policy. If an ETag is provided and doesn't match the current
* ETag of the policy, deletion of the policy will be blocked and an `ABORTED`
* error will be returned.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND`
* is returned. The entity tag (ETag) can be used with `UpdatePolicy()` to
* update a policy during read-modify-write. (policies.get)
*
* @param string $name Required. Resource name of the policy. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Gets the effective policy on a resource. This is the result of merging
* policies in the resource hierarchy and evaluating conditions. The returned
* policy will not have an ETag or `condition` set because it is an evaluated
* policy across multiple resources. Subtrees of Resource Manager resource
* hierarchy with 'under:' prefix will not be expanded.
* (policies.getEffectivePolicy)
*
* @param string $name Required. The effective policy to compute. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function getEffectivePolicy($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getEffectivePolicy', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Retrieves all of the policies that exist on a particular resource.
* (policies.listOrganizationsPolicies)
*
* @param string $parent Required. The target Google Cloud resource that parents
* the set of constraints and policies that will be returned from this call.
* Must be in one of the following forms: * `projects/{project_number}` *
* `projects/{project_id}` * `folders/{folder_id}` *
* `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListPoliciesResponse
* @throws \Google\Service\Exception
*/
public function listOrganizationsPolicies($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListPoliciesResponse::class);
}
/**
* Updates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or the policy doesn't exist.
* Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the ETag
* supplied in the request doesn't match the persisted ETag of the policy. Note:
* the supplied policy will perform a full overwrite of all fields.
* (policies.patch)
*
* @param string $name Immutable. The resource name of the policy. Must be one
* of the following forms, where `constraint_name` is the name of the constraint
* that this policy configures: *
* `projects/{project_number}/policies/{constraint_name}` *
* `folders/{folder_id}/policies/{constraint_name}` *
* `organizations/{organization_id}/policies/{constraint_name}` For example,
* `projects/123/policies/compute.disableSerialPortAccess`. Note:
* `projects/{project_id}/policies/{constraint_name}` is also an acceptable name
* for API requests, but responses will return the name using the equivalent
* project number.
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Field mask used to specify the fields to be
* overwritten in the policy. The fields specified in the update_mask are
* relative to the policy, not the full request.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsPolicies::class, 'Google_Service_OrgPolicyAPI_Resource_OrganizationsPolicies');
@@ -0,0 +1,33 @@
<?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\OrgPolicyAPI\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $projects = $orgpolicyService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_OrgPolicyAPI_Resource_Projects');
@@ -0,0 +1,58 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListConstraintsResponse;
/**
* The "constraints" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $constraints = $orgpolicyService->projects_constraints;
* </code>
*/
class ProjectsConstraints extends \Google\Service\Resource
{
/**
* Lists constraints that could be applied on the specified resource.
* (constraints.listProjectsConstraints)
*
* @param string $parent Required. The Google Cloud resource that parents the
* constraint. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListConstraintsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsConstraints($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListConstraintsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsConstraints::class, 'Google_Service_OrgPolicyAPI_Resource_ProjectsConstraints');
@@ -0,0 +1,174 @@
<?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\OrgPolicyAPI\Resource;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2ListPoliciesResponse;
use Google\Service\OrgPolicyAPI\GoogleCloudOrgpolicyV2Policy;
use Google\Service\OrgPolicyAPI\GoogleProtobufEmpty;
/**
* The "policies" collection of methods.
* Typical usage is:
* <code>
* $orgpolicyService = new Google\Service\OrgPolicyAPI(...);
* $policies = $orgpolicyService->projects_policies;
* </code>
*/
class ProjectsPolicies extends \Google\Service\Resource
{
/**
* Creates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a
* `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy
* already exists on the given Google Cloud resource. (policies.create)
*
* @param string $parent Required. The Google Cloud resource that will parent
* the new policy. Must be in one of the following forms: *
* `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
* * `organizations/{organization_id}`
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Deletes a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not
* exist. (policies.delete)
*
* @param string $name Required. Name of the policy to delete. See the policy
* entry for naming rules.
* @param array $optParams Optional parameters.
*
* @opt_param string etag Optional. The current entity tag (ETag) of the
* organization policy. If an ETag is provided and doesn't match the current
* ETag of the policy, deletion of the policy will be blocked and an `ABORTED`
* error will be returned.
* @return GoogleProtobufEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleProtobufEmpty::class);
}
/**
* Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND`
* is returned. The entity tag (ETag) can be used with `UpdatePolicy()` to
* update a policy during read-modify-write. (policies.get)
*
* @param string $name Required. Resource name of the policy. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Gets the effective policy on a resource. This is the result of merging
* policies in the resource hierarchy and evaluating conditions. The returned
* policy will not have an ETag or `condition` set because it is an evaluated
* policy across multiple resources. Subtrees of Resource Manager resource
* hierarchy with 'under:' prefix will not be expanded.
* (policies.getEffectivePolicy)
*
* @param string $name Required. The effective policy to compute. See Policy for
* naming requirements.
* @param array $optParams Optional parameters.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function getEffectivePolicy($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getEffectivePolicy', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
/**
* Retrieves all of the policies that exist on a particular resource.
* (policies.listProjectsPolicies)
*
* @param string $parent Required. The target Google Cloud resource that parents
* the set of constraints and policies that will be returned from this call.
* Must be in one of the following forms: * `projects/{project_number}` *
* `projects/{project_id}` * `folders/{folder_id}` *
* `organizations/{organization_id}`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Size of the pages to be returned. This is not used,
* but the server may at any point start using this field to limit page size.
* @opt_param string pageToken Page token used to retrieve the next page. This
* is not used, but the server may at any point start using this field.
* @return GoogleCloudOrgpolicyV2ListPoliciesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsPolicies($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudOrgpolicyV2ListPoliciesResponse::class);
}
/**
* Updates a policy. Returns a `google.rpc.Status` with
* `google.rpc.Code.NOT_FOUND` if the constraint or the policy doesn't exist.
* Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the ETag
* supplied in the request doesn't match the persisted ETag of the policy. Note:
* the supplied policy will perform a full overwrite of all fields.
* (policies.patch)
*
* @param string $name Immutable. The resource name of the policy. Must be one
* of the following forms, where `constraint_name` is the name of the constraint
* that this policy configures: *
* `projects/{project_number}/policies/{constraint_name}` *
* `folders/{folder_id}/policies/{constraint_name}` *
* `organizations/{organization_id}/policies/{constraint_name}` For example,
* `projects/123/policies/compute.disableSerialPortAccess`. Note:
* `projects/{project_id}/policies/{constraint_name}` is also an acceptable name
* for API requests, but responses will return the name using the equivalent
* project number.
* @param GoogleCloudOrgpolicyV2Policy $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Field mask used to specify the fields to be
* overwritten in the policy. The fields specified in the update_mask are
* relative to the policy, not the full request.
* @return GoogleCloudOrgpolicyV2Policy
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudOrgpolicyV2Policy $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudOrgpolicyV2Policy::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsPolicies::class, 'Google_Service_OrgPolicyAPI_Resource_ProjectsPolicies');