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,212 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1Budget extends \Google\Collection
{
/**
* Unspecified ownership scope, same as ALL_USERS.
*/
public const OWNERSHIP_SCOPE_OWNERSHIP_SCOPE_UNSPECIFIED = 'OWNERSHIP_SCOPE_UNSPECIFIED';
/**
* Both billing account-level users and project-level users have full access
* to the budget, if the users have the required IAM permissions.
*/
public const OWNERSHIP_SCOPE_ALL_USERS = 'ALL_USERS';
/**
* Only billing account-level users have full access to the budget. Project-
* level users have read-only access, even if they have the required IAM
* permissions.
*/
public const OWNERSHIP_SCOPE_BILLING_ACCOUNT = 'BILLING_ACCOUNT';
protected $collection_key = 'thresholdRules';
protected $amountType = GoogleCloudBillingBudgetsV1BudgetAmount::class;
protected $amountDataType = '';
protected $budgetFilterType = GoogleCloudBillingBudgetsV1Filter::class;
protected $budgetFilterDataType = '';
/**
* User data for display name in UI. The name must be less than or equal to 60
* characters.
*
* @var string
*/
public $displayName;
/**
* Optional. Etag to validate that the object is unchanged for a read-modify-
* write operation. An empty etag causes an update to overwrite other changes.
*
* @var string
*/
public $etag;
/**
* Output only. Resource name of the budget. The resource name implies the
* scope of a budget. Values are of the form
* `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
*
* @var string
*/
public $name;
protected $notificationsRuleType = GoogleCloudBillingBudgetsV1NotificationsRule::class;
protected $notificationsRuleDataType = '';
/**
* @var string
*/
public $ownershipScope;
protected $thresholdRulesType = GoogleCloudBillingBudgetsV1ThresholdRule::class;
protected $thresholdRulesDataType = 'array';
/**
* Required. Budgeted amount.
*
* @param GoogleCloudBillingBudgetsV1BudgetAmount $amount
*/
public function setAmount(GoogleCloudBillingBudgetsV1BudgetAmount $amount)
{
$this->amount = $amount;
}
/**
* @return GoogleCloudBillingBudgetsV1BudgetAmount
*/
public function getAmount()
{
return $this->amount;
}
/**
* Optional. Filters that define which resources are used to compute the
* actual spend against the budget amount, such as projects, services, and the
* budget's time period, as well as other filters.
*
* @param GoogleCloudBillingBudgetsV1Filter $budgetFilter
*/
public function setBudgetFilter(GoogleCloudBillingBudgetsV1Filter $budgetFilter)
{
$this->budgetFilter = $budgetFilter;
}
/**
* @return GoogleCloudBillingBudgetsV1Filter
*/
public function getBudgetFilter()
{
return $this->budgetFilter;
}
/**
* User data for display name in UI. The name must be less than or equal to 60
* characters.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Optional. Etag to validate that the object is unchanged for a read-modify-
* write operation. An empty etag causes an update to overwrite other changes.
*
* @param string $etag
*/
public function setEtag($etag)
{
$this->etag = $etag;
}
/**
* @return string
*/
public function getEtag()
{
return $this->etag;
}
/**
* Output only. Resource name of the budget. The resource name implies the
* scope of a budget. Values are of the form
* `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Optional. Rules to apply to notifications sent based on budget spend and
* thresholds.
*
* @param GoogleCloudBillingBudgetsV1NotificationsRule $notificationsRule
*/
public function setNotificationsRule(GoogleCloudBillingBudgetsV1NotificationsRule $notificationsRule)
{
$this->notificationsRule = $notificationsRule;
}
/**
* @return GoogleCloudBillingBudgetsV1NotificationsRule
*/
public function getNotificationsRule()
{
return $this->notificationsRule;
}
/**
* @param self::OWNERSHIP_SCOPE_* $ownershipScope
*/
public function setOwnershipScope($ownershipScope)
{
$this->ownershipScope = $ownershipScope;
}
/**
* @return self::OWNERSHIP_SCOPE_*
*/
public function getOwnershipScope()
{
return $this->ownershipScope;
}
/**
* Optional. Rules that trigger alerts (notifications of thresholds being
* crossed) when spend exceeds the specified percentages of the budget.
* Optional for `pubsubTopic` notifications. Required if using email
* notifications.
*
* @param GoogleCloudBillingBudgetsV1ThresholdRule[] $thresholdRules
*/
public function setThresholdRules($thresholdRules)
{
$this->thresholdRules = $thresholdRules;
}
/**
* @return GoogleCloudBillingBudgetsV1ThresholdRule[]
*/
public function getThresholdRules()
{
return $this->thresholdRules;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1Budget::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1Budget');
@@ -0,0 +1,69 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1BudgetAmount extends \Google\Model
{
protected $lastPeriodAmountType = GoogleCloudBillingBudgetsV1LastPeriodAmount::class;
protected $lastPeriodAmountDataType = '';
protected $specifiedAmountType = GoogleTypeMoney::class;
protected $specifiedAmountDataType = '';
/**
* Use the last period's actual spend as the budget for the present period.
* LastPeriodAmount can only be set when the budget's time period is a
* Filter.calendar_period. It cannot be set in combination with
* Filter.custom_period.
*
* @param GoogleCloudBillingBudgetsV1LastPeriodAmount $lastPeriodAmount
*/
public function setLastPeriodAmount(GoogleCloudBillingBudgetsV1LastPeriodAmount $lastPeriodAmount)
{
$this->lastPeriodAmount = $lastPeriodAmount;
}
/**
* @return GoogleCloudBillingBudgetsV1LastPeriodAmount
*/
public function getLastPeriodAmount()
{
return $this->lastPeriodAmount;
}
/**
* A specified amount to use as the budget. `currency_code` is optional. If
* specified when creating a budget, it must match the currency of the billing
* account. If specified when updating a budget, it must match the
* currency_code of the existing budget. The `currency_code` is provided on
* output.
*
* @param GoogleTypeMoney $specifiedAmount
*/
public function setSpecifiedAmount(GoogleTypeMoney $specifiedAmount)
{
$this->specifiedAmount = $specifiedAmount;
}
/**
* @return GoogleTypeMoney
*/
public function getSpecifiedAmount()
{
return $this->specifiedAmount;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1BudgetAmount::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1BudgetAmount');
@@ -0,0 +1,64 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1CustomPeriod extends \Google\Model
{
protected $endDateType = GoogleTypeDate::class;
protected $endDateDataType = '';
protected $startDateType = GoogleTypeDate::class;
protected $startDateDataType = '';
/**
* Optional. The end date of the time period. Budgets with elapsed end date
* won't be processed. If unset, specifies to track all usage incurred since
* the start_date.
*
* @param GoogleTypeDate $endDate
*/
public function setEndDate(GoogleTypeDate $endDate)
{
$this->endDate = $endDate;
}
/**
* @return GoogleTypeDate
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* Required. The start date must be after January 1, 2017.
*
* @param GoogleTypeDate $startDate
*/
public function setStartDate(GoogleTypeDate $startDate)
{
$this->startDate = $startDate;
}
/**
* @return GoogleTypeDate
*/
public function getStartDate()
{
return $this->startDate;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1CustomPeriod::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1CustomPeriod');
@@ -0,0 +1,326 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1Filter extends \Google\Collection
{
/**
* Calendar period is unset. This is the default if the budget is for a custom
* time period (CustomPeriod).
*/
public const CALENDAR_PERIOD_CALENDAR_PERIOD_UNSPECIFIED = 'CALENDAR_PERIOD_UNSPECIFIED';
/**
* A month. Month starts on the first day of each month, such as January 1,
* February 1, March 1, and so on.
*/
public const CALENDAR_PERIOD_MONTH = 'MONTH';
/**
* A quarter. Quarters start on dates January 1, April 1, July 1, and October
* 1 of each year.
*/
public const CALENDAR_PERIOD_QUARTER = 'QUARTER';
/**
* A year. Year starts on January 1.
*/
public const CALENDAR_PERIOD_YEAR = 'YEAR';
public const CREDIT_TYPES_TREATMENT_CREDIT_TYPES_TREATMENT_UNSPECIFIED = 'CREDIT_TYPES_TREATMENT_UNSPECIFIED';
/**
* All types of credit are subtracted from the gross cost to determine the
* spend for threshold calculations.
*/
public const CREDIT_TYPES_TREATMENT_INCLUDE_ALL_CREDITS = 'INCLUDE_ALL_CREDITS';
/**
* All types of credit are added to the net cost to determine the spend for
* threshold calculations.
*/
public const CREDIT_TYPES_TREATMENT_EXCLUDE_ALL_CREDITS = 'EXCLUDE_ALL_CREDITS';
/**
* [Credit types](https://cloud.google.com/billing/docs/how-to/export-data-
* bigquery-tables#credits-type) specified in the credit_types field are
* subtracted from the gross cost to determine the spend for threshold
* calculations.
*/
public const CREDIT_TYPES_TREATMENT_INCLUDE_SPECIFIED_CREDITS = 'INCLUDE_SPECIFIED_CREDITS';
protected $collection_key = 'subaccounts';
/**
* Optional. Specifies to track usage for recurring calendar period. For
* example, assume that CalendarPeriod.QUARTER is set. The budget tracks usage
* from April 1 to June 30, when the current calendar month is April, May,
* June. After that, it tracks usage from July 1 to September 30 when the
* current calendar month is July, August, September, so on.
*
* @var string
*/
public $calendarPeriod;
/**
* Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS,
* this is a list of credit types to be subtracted from gross cost to
* determine the spend for threshold calculations. See [a list of acceptable
* credit type values](https://cloud.google.com/billing/docs/how-to/export-
* data-bigquery-tables#credits-type). If Filter.credit_types_treatment is
* **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
*
* @var string[]
*/
public $creditTypes;
/**
* Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
*
* @var string
*/
public $creditTypesTreatment;
protected $customPeriodType = GoogleCloudBillingBudgetsV1CustomPeriod::class;
protected $customPeriodDataType = '';
/**
* Optional. A single label and value pair specifying that usage from only
* this set of labeled resources should be included in the budget. If omitted,
* the report includes all labeled and unlabeled usage. An object containing a
* single `"key": value` pair. Example: `{ "name": "wrench" }`. _Currently,
* multiple entries or multiple values per entry are not allowed._
*
* @var array[]
*/
public $labels;
/**
* Optional. A set of projects of the form `projects/{project}`, specifying
* that usage from only this set of projects should be included in the budget.
* If omitted, the report includes all usage for the billing account,
* regardless of which project the usage occurred on.
*
* @var string[]
*/
public $projects;
/**
* Optional. A set of folder and organization names of the form
* `folders/{folderId}` or `organizations/{organizationId}`, specifying that
* usage from only this set of folders and organizations should be included in
* the budget. If omitted, the budget includes all usage that the billing
* account pays for. If the folder or organization contains projects that are
* paid for by a different Cloud Billing account, the budget *doesn't* apply
* to those projects.
*
* @var string[]
*/
public $resourceAncestors;
/**
* Optional. A set of services of the form `services/{service_id}`, specifying
* that usage from only this set of services should be included in the budget.
* If omitted, the report includes usage for all the services. The service
* names are available through the Catalog API:
* https://cloud.google.com/billing/v1/how-tos/catalog-api.
*
* @var string[]
*/
public $services;
/**
* Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
* specifying that usage from only this set of subaccounts should be included
* in the budget. If a subaccount is set to the name of the parent account,
* usage from the parent account is included. If the field is omitted, the
* report includes usage from the parent account and all subaccounts, if they
* exist.
*
* @var string[]
*/
public $subaccounts;
/**
* Optional. Specifies to track usage for recurring calendar period. For
* example, assume that CalendarPeriod.QUARTER is set. The budget tracks usage
* from April 1 to June 30, when the current calendar month is April, May,
* June. After that, it tracks usage from July 1 to September 30 when the
* current calendar month is July, August, September, so on.
*
* Accepted values: CALENDAR_PERIOD_UNSPECIFIED, MONTH, QUARTER, YEAR
*
* @param self::CALENDAR_PERIOD_* $calendarPeriod
*/
public function setCalendarPeriod($calendarPeriod)
{
$this->calendarPeriod = $calendarPeriod;
}
/**
* @return self::CALENDAR_PERIOD_*
*/
public function getCalendarPeriod()
{
return $this->calendarPeriod;
}
/**
* Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS,
* this is a list of credit types to be subtracted from gross cost to
* determine the spend for threshold calculations. See [a list of acceptable
* credit type values](https://cloud.google.com/billing/docs/how-to/export-
* data-bigquery-tables#credits-type). If Filter.credit_types_treatment is
* **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
*
* @param string[] $creditTypes
*/
public function setCreditTypes($creditTypes)
{
$this->creditTypes = $creditTypes;
}
/**
* @return string[]
*/
public function getCreditTypes()
{
return $this->creditTypes;
}
/**
* Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
*
* Accepted values: CREDIT_TYPES_TREATMENT_UNSPECIFIED, INCLUDE_ALL_CREDITS,
* EXCLUDE_ALL_CREDITS, INCLUDE_SPECIFIED_CREDITS
*
* @param self::CREDIT_TYPES_TREATMENT_* $creditTypesTreatment
*/
public function setCreditTypesTreatment($creditTypesTreatment)
{
$this->creditTypesTreatment = $creditTypesTreatment;
}
/**
* @return self::CREDIT_TYPES_TREATMENT_*
*/
public function getCreditTypesTreatment()
{
return $this->creditTypesTreatment;
}
/**
* Optional. Specifies to track usage from any start date (required) to any
* end date (optional). This time period is static, it does not recur.
*
* @param GoogleCloudBillingBudgetsV1CustomPeriod $customPeriod
*/
public function setCustomPeriod(GoogleCloudBillingBudgetsV1CustomPeriod $customPeriod)
{
$this->customPeriod = $customPeriod;
}
/**
* @return GoogleCloudBillingBudgetsV1CustomPeriod
*/
public function getCustomPeriod()
{
return $this->customPeriod;
}
/**
* Optional. A single label and value pair specifying that usage from only
* this set of labeled resources should be included in the budget. If omitted,
* the report includes all labeled and unlabeled usage. An object containing a
* single `"key": value` pair. Example: `{ "name": "wrench" }`. _Currently,
* multiple entries or multiple values per entry are not allowed._
*
* @param array[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return array[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Optional. A set of projects of the form `projects/{project}`, specifying
* that usage from only this set of projects should be included in the budget.
* If omitted, the report includes all usage for the billing account,
* regardless of which project the usage occurred on.
*
* @param string[] $projects
*/
public function setProjects($projects)
{
$this->projects = $projects;
}
/**
* @return string[]
*/
public function getProjects()
{
return $this->projects;
}
/**
* Optional. A set of folder and organization names of the form
* `folders/{folderId}` or `organizations/{organizationId}`, specifying that
* usage from only this set of folders and organizations should be included in
* the budget. If omitted, the budget includes all usage that the billing
* account pays for. If the folder or organization contains projects that are
* paid for by a different Cloud Billing account, the budget *doesn't* apply
* to those projects.
*
* @param string[] $resourceAncestors
*/
public function setResourceAncestors($resourceAncestors)
{
$this->resourceAncestors = $resourceAncestors;
}
/**
* @return string[]
*/
public function getResourceAncestors()
{
return $this->resourceAncestors;
}
/**
* Optional. A set of services of the form `services/{service_id}`, specifying
* that usage from only this set of services should be included in the budget.
* If omitted, the report includes usage for all the services. The service
* names are available through the Catalog API:
* https://cloud.google.com/billing/v1/how-tos/catalog-api.
*
* @param string[] $services
*/
public function setServices($services)
{
$this->services = $services;
}
/**
* @return string[]
*/
public function getServices()
{
return $this->services;
}
/**
* Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
* specifying that usage from only this set of subaccounts should be included
* in the budget. If a subaccount is set to the name of the parent account,
* usage from the parent account is included. If the field is omitted, the
* report includes usage from the parent account and all subaccounts, if they
* exist.
*
* @param string[] $subaccounts
*/
public function setSubaccounts($subaccounts)
{
$this->subaccounts = $subaccounts;
}
/**
* @return string[]
*/
public function getSubaccounts()
{
return $this->subaccounts;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1Filter::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1Filter');
@@ -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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1LastPeriodAmount extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1LastPeriodAmount::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1LastPeriodAmount');
@@ -0,0 +1,69 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1ListBudgetsResponse extends \Google\Collection
{
protected $collection_key = 'budgets';
protected $budgetsType = GoogleCloudBillingBudgetsV1Budget::class;
protected $budgetsDataType = 'array';
/**
* If not empty, indicates that there may be more budgets that match the
* request; this value should be passed in a new `ListBudgetsRequest`.
*
* @var string
*/
public $nextPageToken;
/**
* List of the budgets owned by the requested billing account.
*
* @param GoogleCloudBillingBudgetsV1Budget[] $budgets
*/
public function setBudgets($budgets)
{
$this->budgets = $budgets;
}
/**
* @return GoogleCloudBillingBudgetsV1Budget[]
*/
public function getBudgets()
{
return $this->budgets;
}
/**
* If not empty, indicates that there may be more budgets that match the
* request; this value should be passed in a new `ListBudgetsRequest`.
*
* @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(GoogleCloudBillingBudgetsV1ListBudgetsResponse::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1ListBudgetsResponse');
@@ -0,0 +1,233 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1NotificationsRule extends \Google\Collection
{
protected $collection_key = 'monitoringNotificationChannels';
/**
* Optional. When set to true, disables default notifications sent when a
* threshold is exceeded. Default notifications are sent to those with Billing
* Account Administrator and Billing Account User IAM roles for the target
* account.
*
* @var bool
*/
public $disableDefaultIamRecipients;
/**
* Optional. When set to true, and when the budget has a single project
* configured, notifications will be sent to project level recipients of that
* project. This field will be ignored if the budget has multiple or no
* project configured. Currently, project level recipients are the users with
* `Owner` role on a cloud project.
*
* @var bool
*/
public $enableProjectLevelRecipients;
/**
* Optional. Email targets to send notifications to when a threshold is
* exceeded. This is in addition to the `DefaultIamRecipients` who receive
* alert emails based on their billing account IAM role. The value is the full
* REST resource name of a Cloud Monitoring email notification channel with
* the form `projects/{project_id}/notificationChannels/{channel_id}`. A
* maximum of 5 email notifications are allowed. To customize budget alert
* email recipients with monitoring notification channels, you _must create
* the monitoring notification channels before you link them to a budget_. For
* guidance on setting up notification channels to use with budgets, see
* [Customize budget alert email
* recipients](https://cloud.google.com/billing/docs/how-to/budgets-
* notification-recipients). For Cloud Billing budget alerts, you _must use
* email notification channels_. The other types of notification channels are
* _not_ supported, such as Slack, SMS, or PagerDuty. If you want to [send
* budget notifications to Slack](https://cloud.google.com/billing/docs/how-
* to/notify#send_notifications_to_slack), use a pubsubTopic and configure
* [programmatic notifications](https://cloud.google.com/billing/docs/how-
* to/budgets-programmatic-notifications).
*
* @var string[]
*/
public $monitoringNotificationChannels;
/**
* Optional. The name of the Pub/Sub topic where budget-related messages are
* published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
* are sent to the topic at regular intervals; the timing of the updates is
* not dependent on the [threshold rules](#thresholdrule) you've set. Note
* that if you want your [Pub/Sub JSON
* object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#notification_format) to contain data for
* `alertThresholdExceeded`, you need at least one [alert threshold
* rule](#thresholdrule). When you set threshold rules, you must also enable
* at least one of the email notification options, either using the default
* IAM recipients or Cloud Monitoring email notification channels. To use
* Pub/Sub topics with budgets, you must do the following: 1. Create the
* Pub/Sub topic before connecting it to your budget. For guidance, see
* [Manage programmatic budget alert
* notifications](https://cloud.google.com/billing/docs/how-to/budgets-
* programmatic-notifications). 2. Grant the API caller the
* `pubsub.topics.setIamPolicy` permission on the Pub/Sub topic. If not set,
* the API call fails with PERMISSION_DENIED. For additional details on
* Pub/Sub roles and permissions, see [Permissions required for this
* task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#permissions_required_for_this_task).
*
* @var string
*/
public $pubsubTopic;
/**
* Optional. Required when NotificationsRule.pubsub_topic is set. The schema
* version of the notification sent to NotificationsRule.pubsub_topic. Only
* "1.0" is accepted. It represents the JSON schema as defined in
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#notification_format.
*
* @var string
*/
public $schemaVersion;
/**
* Optional. When set to true, disables default notifications sent when a
* threshold is exceeded. Default notifications are sent to those with Billing
* Account Administrator and Billing Account User IAM roles for the target
* account.
*
* @param bool $disableDefaultIamRecipients
*/
public function setDisableDefaultIamRecipients($disableDefaultIamRecipients)
{
$this->disableDefaultIamRecipients = $disableDefaultIamRecipients;
}
/**
* @return bool
*/
public function getDisableDefaultIamRecipients()
{
return $this->disableDefaultIamRecipients;
}
/**
* Optional. When set to true, and when the budget has a single project
* configured, notifications will be sent to project level recipients of that
* project. This field will be ignored if the budget has multiple or no
* project configured. Currently, project level recipients are the users with
* `Owner` role on a cloud project.
*
* @param bool $enableProjectLevelRecipients
*/
public function setEnableProjectLevelRecipients($enableProjectLevelRecipients)
{
$this->enableProjectLevelRecipients = $enableProjectLevelRecipients;
}
/**
* @return bool
*/
public function getEnableProjectLevelRecipients()
{
return $this->enableProjectLevelRecipients;
}
/**
* Optional. Email targets to send notifications to when a threshold is
* exceeded. This is in addition to the `DefaultIamRecipients` who receive
* alert emails based on their billing account IAM role. The value is the full
* REST resource name of a Cloud Monitoring email notification channel with
* the form `projects/{project_id}/notificationChannels/{channel_id}`. A
* maximum of 5 email notifications are allowed. To customize budget alert
* email recipients with monitoring notification channels, you _must create
* the monitoring notification channels before you link them to a budget_. For
* guidance on setting up notification channels to use with budgets, see
* [Customize budget alert email
* recipients](https://cloud.google.com/billing/docs/how-to/budgets-
* notification-recipients). For Cloud Billing budget alerts, you _must use
* email notification channels_. The other types of notification channels are
* _not_ supported, such as Slack, SMS, or PagerDuty. If you want to [send
* budget notifications to Slack](https://cloud.google.com/billing/docs/how-
* to/notify#send_notifications_to_slack), use a pubsubTopic and configure
* [programmatic notifications](https://cloud.google.com/billing/docs/how-
* to/budgets-programmatic-notifications).
*
* @param string[] $monitoringNotificationChannels
*/
public function setMonitoringNotificationChannels($monitoringNotificationChannels)
{
$this->monitoringNotificationChannels = $monitoringNotificationChannels;
}
/**
* @return string[]
*/
public function getMonitoringNotificationChannels()
{
return $this->monitoringNotificationChannels;
}
/**
* Optional. The name of the Pub/Sub topic where budget-related messages are
* published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
* are sent to the topic at regular intervals; the timing of the updates is
* not dependent on the [threshold rules](#thresholdrule) you've set. Note
* that if you want your [Pub/Sub JSON
* object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#notification_format) to contain data for
* `alertThresholdExceeded`, you need at least one [alert threshold
* rule](#thresholdrule). When you set threshold rules, you must also enable
* at least one of the email notification options, either using the default
* IAM recipients or Cloud Monitoring email notification channels. To use
* Pub/Sub topics with budgets, you must do the following: 1. Create the
* Pub/Sub topic before connecting it to your budget. For guidance, see
* [Manage programmatic budget alert
* notifications](https://cloud.google.com/billing/docs/how-to/budgets-
* programmatic-notifications). 2. Grant the API caller the
* `pubsub.topics.setIamPolicy` permission on the Pub/Sub topic. If not set,
* the API call fails with PERMISSION_DENIED. For additional details on
* Pub/Sub roles and permissions, see [Permissions required for this
* task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#permissions_required_for_this_task).
*
* @param string $pubsubTopic
*/
public function setPubsubTopic($pubsubTopic)
{
$this->pubsubTopic = $pubsubTopic;
}
/**
* @return string
*/
public function getPubsubTopic()
{
return $this->pubsubTopic;
}
/**
* Optional. Required when NotificationsRule.pubsub_topic is set. The schema
* version of the notification sent to NotificationsRule.pubsub_topic. Only
* "1.0" is accepted. It represents the JSON schema as defined in
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-
* notifications#notification_format.
*
* @param string $schemaVersion
*/
public function setSchemaVersion($schemaVersion)
{
$this->schemaVersion = $schemaVersion;
}
/**
* @return string
*/
public function getSchemaVersion()
{
return $this->schemaVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1NotificationsRule::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1NotificationsRule');
@@ -0,0 +1,82 @@
<?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\CloudBillingBudget;
class GoogleCloudBillingBudgetsV1ThresholdRule extends \Google\Model
{
/**
* Unspecified threshold basis.
*/
public const SPEND_BASIS_BASIS_UNSPECIFIED = 'BASIS_UNSPECIFIED';
/**
* Use current spend as the basis for comparison against the threshold.
*/
public const SPEND_BASIS_CURRENT_SPEND = 'CURRENT_SPEND';
/**
* Use forecasted spend for the period as the basis for comparison against the
* threshold. FORECASTED_SPEND can only be set when the budget's time period
* is a Filter.calendar_period. It cannot be set in combination with
* Filter.custom_period.
*/
public const SPEND_BASIS_FORECASTED_SPEND = 'FORECASTED_SPEND';
/**
* Optional. The type of basis used to determine if spend has passed the
* threshold. Behavior defaults to CURRENT_SPEND if not set.
*
* @var string
*/
public $spendBasis;
/**
* Required. Send an alert when this threshold is exceeded. This is a
* 1.0-based percentage, so 0.5 = 50%. Validation: non-negative number.
*
* @var
*/
public $thresholdPercent;
/**
* Optional. The type of basis used to determine if spend has passed the
* threshold. Behavior defaults to CURRENT_SPEND if not set.
*
* Accepted values: BASIS_UNSPECIFIED, CURRENT_SPEND, FORECASTED_SPEND
*
* @param self::SPEND_BASIS_* $spendBasis
*/
public function setSpendBasis($spendBasis)
{
$this->spendBasis = $spendBasis;
}
/**
* @return self::SPEND_BASIS_*
*/
public function getSpendBasis()
{
return $this->spendBasis;
}
public function setThresholdPercent($thresholdPercent)
{
$this->thresholdPercent = $thresholdPercent;
}
public function getThresholdPercent()
{
return $this->thresholdPercent;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudBillingBudgetsV1ThresholdRule::class, 'Google_Service_CloudBillingBudget_GoogleCloudBillingBudgetsV1ThresholdRule');
@@ -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\CloudBillingBudget;
class GoogleProtobufEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleProtobufEmpty::class, 'Google_Service_CloudBillingBudget_GoogleProtobufEmpty');
@@ -0,0 +1,100 @@
<?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\CloudBillingBudget;
class GoogleTypeDate extends \Google\Model
{
/**
* Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
* to specify a year by itself or a year and month where the day isn't
* significant.
*
* @var int
*/
public $day;
/**
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a
* month and day.
*
* @var int
*/
public $month;
/**
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
* year.
*
* @var int
*/
public $year;
/**
* Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
* to specify a year by itself or a year and month where the day isn't
* significant.
*
* @param int $day
*/
public function setDay($day)
{
$this->day = $day;
}
/**
* @return int
*/
public function getDay()
{
return $this->day;
}
/**
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a
* month and day.
*
* @param int $month
*/
public function setMonth($month)
{
$this->month = $month;
}
/**
* @return int
*/
public function getMonth()
{
return $this->month;
}
/**
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
* year.
*
* @param int $year
*/
public function setYear($year)
{
$this->year = $year;
}
/**
* @return int
*/
public function getYear()
{
return $this->year;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleTypeDate::class, 'Google_Service_CloudBillingBudget_GoogleTypeDate');
@@ -0,0 +1,104 @@
<?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\CloudBillingBudget;
class GoogleTypeMoney extends \Google\Model
{
/**
* The three-letter currency code defined in ISO 4217.
*
* @var string
*/
public $currencyCode;
/**
* Number of nano (10^-9) units of the amount. The value must be between
* -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
* must be positive or zero. If `units` is zero, `nanos` can be positive,
* zero, or negative. If `units` is negative, `nanos` must be negative or
* zero. For example $-1.75 is represented as `units`=-1 and
* `nanos`=-750,000,000.
*
* @var int
*/
public $nanos;
/**
* The whole units of the amount. For example if `currencyCode` is `"USD"`,
* then 1 unit is one US dollar.
*
* @var string
*/
public $units;
/**
* The three-letter currency code defined in ISO 4217.
*
* @param string $currencyCode
*/
public function setCurrencyCode($currencyCode)
{
$this->currencyCode = $currencyCode;
}
/**
* @return string
*/
public function getCurrencyCode()
{
return $this->currencyCode;
}
/**
* Number of nano (10^-9) units of the amount. The value must be between
* -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
* must be positive or zero. If `units` is zero, `nanos` can be positive,
* zero, or negative. If `units` is negative, `nanos` must be negative or
* zero. For example $-1.75 is represented as `units`=-1 and
* `nanos`=-750,000,000.
*
* @param int $nanos
*/
public function setNanos($nanos)
{
$this->nanos = $nanos;
}
/**
* @return int
*/
public function getNanos()
{
return $this->nanos;
}
/**
* The whole units of the amount. For example if `currencyCode` is `"USD"`,
* then 1 unit is one US dollar.
*
* @param string $units
*/
public function setUnits($units)
{
$this->units = $units;
}
/**
* @return string
*/
public function getUnits()
{
return $this->units;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleTypeMoney::class, 'Google_Service_CloudBillingBudget_GoogleTypeMoney');
@@ -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\CloudBillingBudget\Resource;
/**
* The "billingAccounts" collection of methods.
* Typical usage is:
* <code>
* $billingbudgetsService = new Google\Service\CloudBillingBudget(...);
* $billingAccounts = $billingbudgetsService->billingAccounts;
* </code>
*/
class BillingAccounts extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccounts::class, 'Google_Service_CloudBillingBudget_Resource_BillingAccounts');
@@ -0,0 +1,146 @@
<?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\CloudBillingBudget\Resource;
use Google\Service\CloudBillingBudget\GoogleCloudBillingBudgetsV1Budget;
use Google\Service\CloudBillingBudget\GoogleCloudBillingBudgetsV1ListBudgetsResponse;
use Google\Service\CloudBillingBudget\GoogleProtobufEmpty;
/**
* The "budgets" collection of methods.
* Typical usage is:
* <code>
* $billingbudgetsService = new Google\Service\CloudBillingBudget(...);
* $budgets = $billingbudgetsService->billingAccounts_budgets;
* </code>
*/
class BillingAccountsBudgets extends \Google\Service\Resource
{
/**
* Creates a new budget. See [Quotas and
* limits](https://cloud.google.com/billing/quotas) for more information on the
* limits of the number of budgets you can create. (budgets.create)
*
* @param string $parent Required. The name of the billing account to create the
* budget in. Values are of the form `billingAccounts/{billingAccountId}`.
* @param GoogleCloudBillingBudgetsV1Budget $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudBillingBudgetsV1Budget
* @throws \Google\Service\Exception
*/
public function create($parent, GoogleCloudBillingBudgetsV1Budget $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleCloudBillingBudgetsV1Budget::class);
}
/**
* Deletes a budget. Returns successfully if already deleted. (budgets.delete)
*
* @param string $name Required. Name of the budget to delete. Values are of the
* form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
* @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);
}
/**
* Returns a budget. WARNING: There are some fields exposed on the Google Cloud
* Console that aren't available on this API. When reading from the API, you
* will not see these fields in the return value, though they may have been set
* in the Cloud Console. (budgets.get)
*
* @param string $name Required. Name of budget to get. Values are of the form
* `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
* @param array $optParams Optional parameters.
* @return GoogleCloudBillingBudgetsV1Budget
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudBillingBudgetsV1Budget::class);
}
/**
* Returns a list of budgets for a billing account. WARNING: There are some
* fields exposed on the Google Cloud Console that aren't available on this API.
* When reading from the API, you will not see these fields in the return value,
* though they may have been set in the Cloud Console.
* (budgets.listBillingAccountsBudgets)
*
* @param string $parent Required. Name of billing account to list budgets
* under. Values are of the form `billingAccounts/{billingAccountId}`.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Optional. The maximum number of budgets to return per
* page. The default and maximum value are 100.
* @opt_param string pageToken Optional. The value returned by the last
* `ListBudgetsResponse` which indicates that this is a continuation of a prior
* `ListBudgets` call, and that the system should return the next page of data.
* @opt_param string scope Optional. Set the scope of the budgets to be
* returned, in the format of the resource name. The scope of a budget is the
* cost that it tracks, such as costs for a single project, or the costs for all
* projects in a folder. Only project scope (in the format of "projects/project-
* id" or "projects/123") is supported in this field. When this field is set to
* a project's resource name, the budgets returned are tracking the costs for
* that project.
* @return GoogleCloudBillingBudgetsV1ListBudgetsResponse
* @throws \Google\Service\Exception
*/
public function listBillingAccountsBudgets($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudBillingBudgetsV1ListBudgetsResponse::class);
}
/**
* Updates a budget and returns the updated budget. WARNING: There are some
* fields exposed on the Google Cloud Console that aren't available on this API.
* Budget fields that are not exposed in this API will not be changed by this
* method. (budgets.patch)
*
* @param string $name Output only. Resource name of the budget. The resource
* name implies the scope of a budget. Values are of the form
* `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
* @param GoogleCloudBillingBudgetsV1Budget $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Indicates which fields in the provided
* budget to update. Read-only fields (such as `name`) cannot be changed. If
* this is not provided, then only fields with non-default values from the
* request are updated. See https://developers.google.com/protocol-
* buffers/docs/proto3#default for more details about default values.
* @return GoogleCloudBillingBudgetsV1Budget
* @throws \Google\Service\Exception
*/
public function patch($name, GoogleCloudBillingBudgetsV1Budget $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GoogleCloudBillingBudgetsV1Budget::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsBudgets::class, 'Google_Service_CloudBillingBudget_Resource_BillingAccountsBudgets');