ServiceObject is a base class, meant to be inherited from by a "service object," like a BigQuery dataset or Storage bucket.
Most of the time, these objects share common functionality; they can be created or deleted, and you can get or set their metadata.
By inheriting from this class, a service object will be extended with these shared behaviors. Note that any method can be overridden when the service object requires specific behavior.
[[["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-08-28 UTC."],[],[],null,["# Package @google-cloud/common (6.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [6.0.0 (latest)](/nodejs/docs/reference/common/latest/overview)\n- [5.0.2](/nodejs/docs/reference/common/5.0.2/overview)\n- [4.0.3](/nodejs/docs/reference/common/4.0.3/overview)\n- [3.10.0](/nodejs/docs/reference/common/3.10.0/overview)\n- [3.9.0](/nodejs/docs/reference/common/3.9.0/overview)\n- [3.8.1](/nodejs/docs/reference/common/3.8.1/overview)\n- [3.7.4](/nodejs/docs/reference/common/3.7.4/overview) \n\nClasses\n-------\n\n### [ApiError](/nodejs/docs/reference/common/latest/common/apierror)\n\nCustom error type for API errors.\n\n### [Operation](/nodejs/docs/reference/common/latest/common/operation)\n\n### [Service](/nodejs/docs/reference/common/latest/common/service)\n\n### [ServiceObject](/nodejs/docs/reference/common/latest/common/serviceobject)\n\nServiceObject is a base class, meant to be inherited from by a \"service object,\" like a BigQuery dataset or Storage bucket.\n\nMost of the time, these objects share common functionality; they can be created or deleted, and you can get or set their metadata.\n\nBy inheriting from this class, a service object will be extended with these shared behaviors. Note that any method can be overridden when the service object requires specific behavior.\n\nInterfaces\n----------\n\n### [Abortable](/nodejs/docs/reference/common/latest/common/abortable)\n\n### [BodyResponseCallback](/nodejs/docs/reference/common/latest/common/bodyresponsecallback)\n\n### [DecorateRequestOptions](/nodejs/docs/reference/common/latest/common/decoraterequestoptions)\n\n### [DeleteCallback](/nodejs/docs/reference/common/latest/common/deletecallback)\n\n### [ExistsCallback](/nodejs/docs/reference/common/latest/common/existscallback)\n\n### [GetConfig](/nodejs/docs/reference/common/latest/common/getconfig)\n\n### [InstanceResponseCallback](/nodejs/docs/reference/common/latest/common/instanceresponsecallback)\n\n### [Interceptor](/nodejs/docs/reference/common/latest/common/interceptor)\n\n### [Methods](/nodejs/docs/reference/common/latest/common/methods)\n\n### [ResponseCallback](/nodejs/docs/reference/common/latest/common/responsecallback)\n\n### [ServiceConfig](/nodejs/docs/reference/common/latest/common/serviceconfig)\n\n### [ServiceObjectConfig](/nodejs/docs/reference/common/latest/common/serviceobjectconfig)\n\n### [ServiceObjectParent](/nodejs/docs/reference/common/latest/common/serviceobjectparent)\n\n### [ServiceOptions](/nodejs/docs/reference/common/latest/common/serviceoptions)\n\n### [StreamRequestOptions](/nodejs/docs/reference/common/latest/common/streamrequestoptions)\n\nVariables\n---------\n\n### util\n\n util: Util\n\nType Aliases\n------------\n\n### AbortableDuplex\n\n export declare type AbortableDuplex = Duplexify & Abortable;\n\n### Metadata\n\n export declare type Metadata = any;\n\n### MetadataCallback\n\n export declare type MetadataCallback = (err: Error | null, metadata?: Metadata, apiResponse?: r.Response) =\u003e void;\n\n### MetadataResponse\n\n export declare type MetadataResponse = [Metadata, r.Response];\n\n### ResponseBody\n\n export declare type ResponseBody = any;\n\n### SetMetadataResponse\n\n export declare type SetMetadataResponse = [Metadata];"]]