Reference documentation and code samples for the Google Cloud Service Usage V1 Client class DisableServiceRequest.
Request message for theDisableServicemethod.
Generated from protobuf messagegoogle.api.serviceusage.v1.DisableServiceRequest
Namespace
Google \ Cloud \ ServiceUsage \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be:projects/123/services/serviceusage.googleapis.comwhere123is the project number.
↳ disable_dependent_services
bool
Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together.
↳ check_if_service_has_usage
int
Defines the behavior for checking service usage when disabling a service.
getName
Name of the consumer and service to disable the service on.
The enable and disable methods currently only support projects.
An example name would be:projects/123/services/serviceusage.googleapis.comwhere123is the
project number.
Returns
Type
Description
string
setName
Name of the consumer and service to disable the service on.
The enable and disable methods currently only support projects.
An example name would be:projects/123/services/serviceusage.googleapis.comwhere123is the
project number.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisableDependentServices
Indicates if services that are enabled and which depend on this service
should also be disabled. If not set, an error will be generated if any
enabled services depend on the service to be disabled. When set, the
service, and any enabled services that depend on it, will be disabled
together.
Returns
Type
Description
bool
setDisableDependentServices
Indicates if services that are enabled and which depend on this service
should also be disabled. If not set, an error will be generated if any
enabled services depend on the service to be disabled. When set, the
service, and any enabled services that depend on it, will be disabled
together.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getCheckIfServiceHasUsage
Defines the behavior for checking service usage when disabling a service.
Returns
Type
Description
int
setCheckIfServiceHasUsage
Defines the behavior for checking service usage when disabling a service.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Service Usage V1 Client - Class DisableServiceRequest (2.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.4 (latest)](/php/docs/reference/cloud-service-usage/latest/V1.DisableServiceRequest)\n- [2.0.3](/php/docs/reference/cloud-service-usage/2.0.3/V1.DisableServiceRequest)\n- [1.3.4](/php/docs/reference/cloud-service-usage/1.3.4/V1.DisableServiceRequest)\n- [1.2.3](/php/docs/reference/cloud-service-usage/1.2.3/V1.DisableServiceRequest)\n- [1.1.1](/php/docs/reference/cloud-service-usage/1.1.1/V1.DisableServiceRequest)\n- [1.0.5](/php/docs/reference/cloud-service-usage/1.0.5/V1.DisableServiceRequest) \nReference documentation and code samples for the Google Cloud Service Usage V1 Client class DisableServiceRequest.\n\nRequest message for the `DisableService` method.\n\nGenerated from protobuf message `google.api.serviceusage.v1.DisableServiceRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ServiceUsage \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nName of the consumer and service to disable the service on.\n\nThe enable and disable methods currently only support projects.\nAn example name would be:\n`projects/123/services/serviceusage.googleapis.com` where `123` is the\nproject number.\n\n### setName\n\nName of the consumer and service to disable the service on.\n\nThe enable and disable methods currently only support projects.\nAn example name would be:\n`projects/123/services/serviceusage.googleapis.com` where `123` is the\nproject number.\n\n### getDisableDependentServices\n\nIndicates if services that are enabled and which depend on this service\nshould also be disabled. If not set, an error will be generated if any\nenabled services depend on the service to be disabled. When set, the\nservice, and any enabled services that depend on it, will be disabled\ntogether.\n\n### setDisableDependentServices\n\nIndicates if services that are enabled and which depend on this service\nshould also be disabled. If not set, an error will be generated if any\nenabled services depend on the service to be disabled. When set, the\nservice, and any enabled services that depend on it, will be disabled\ntogether.\n\n### getCheckIfServiceHasUsage\n\nDefines the behavior for checking service usage when disabling a service.\n\n### setCheckIfServiceHasUsage\n\nDefines the behavior for checking service usage when disabling a service."]]