[[["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."],[[["\u003cp\u003eThe latest version available is 2.37.0-rc, and there are multiple past versions available, ranging from 2.36.0 down to 2.10.1.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation describes the \u003ccode\u003eLocation\u003c/code\u003e class, which represents a Google Cloud location identified by a \u003ccode\u003eproject_id\u003c/code\u003e and \u003ccode\u003elocation_id\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLocation\u003c/code\u003e class offers various constructors, including ones that take \u003ccode\u003eProject\u003c/code\u003e and \u003ccode\u003estd::string\u003c/code\u003e objects or two \u003ccode\u003estd::string\u003c/code\u003e objects for the \u003ccode\u003eproject_id\u003c/code\u003e and \u003ccode\u003elocation_id\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLocation\u003c/code\u003e class provides methods to retrieve the \u003ccode\u003eProject\u003c/code\u003e, \u003ccode\u003eproject_id\u003c/code\u003e, and \u003ccode\u003elocation_id\u003c/code\u003e as well as \u003ccode\u003eFullName()\u003c/code\u003e to give the full qualified location name, and also contains copy/move constructors and operators.\u003c/p\u003e\n"],["\u003cp\u003eThe class will not validate the values provided to it, and relies on the user to enter valid project and location ids.\u003c/p\u003e\n"]]],[],null,["# Class Location (2.42.0-rc)\n\nVersion latestkeyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Location)\n- [2.41.0](/cpp/docs/reference/common/2.41.0/classgoogle_1_1cloud_1_1Location)\n- [2.40.0](/cpp/docs/reference/common/2.40.0/classgoogle_1_1cloud_1_1Location)\n- [2.39.0](/cpp/docs/reference/common/2.39.0/classgoogle_1_1cloud_1_1Location)\n- [2.38.0](/cpp/docs/reference/common/2.38.0/classgoogle_1_1cloud_1_1Location)\n- [2.37.0](/cpp/docs/reference/common/2.37.0/classgoogle_1_1cloud_1_1Location)\n- [2.36.0](/cpp/docs/reference/common/2.36.0/classgoogle_1_1cloud_1_1Location)\n- [2.35.0](/cpp/docs/reference/common/2.35.0/classgoogle_1_1cloud_1_1Location)\n- [2.34.0](/cpp/docs/reference/common/2.34.0/classgoogle_1_1cloud_1_1Location)\n- [2.33.0](/cpp/docs/reference/common/2.33.0/classgoogle_1_1cloud_1_1Location)\n- [2.32.0](/cpp/docs/reference/common/2.32.0/classgoogle_1_1cloud_1_1Location)\n- [2.31.0](/cpp/docs/reference/common/2.31.0/classgoogle_1_1cloud_1_1Location)\n- [2.30.0](/cpp/docs/reference/common/2.30.0/classgoogle_1_1cloud_1_1Location)\n- [2.29.0](/cpp/docs/reference/common/2.29.0/classgoogle_1_1cloud_1_1Location)\n- [2.28.0](/cpp/docs/reference/common/2.28.0/classgoogle_1_1cloud_1_1Location)\n- [2.27.0](/cpp/docs/reference/common/2.27.0/classgoogle_1_1cloud_1_1Location)\n- [2.26.0](/cpp/docs/reference/common/2.26.0/classgoogle_1_1cloud_1_1Location)\n- [2.25.1](/cpp/docs/reference/common/2.25.1/classgoogle_1_1cloud_1_1Location)\n- [2.24.0](/cpp/docs/reference/common/2.24.0/classgoogle_1_1cloud_1_1Location)\n- [2.23.0](/cpp/docs/reference/common/2.23.0/classgoogle_1_1cloud_1_1Location)\n- [2.22.1](/cpp/docs/reference/common/2.22.1/classgoogle_1_1cloud_1_1Location)\n- [2.21.0](/cpp/docs/reference/common/2.21.0/classgoogle_1_1cloud_1_1Location)\n- [2.20.0](/cpp/docs/reference/common/2.20.0/classgoogle_1_1cloud_1_1Location)\n- [2.19.0](/cpp/docs/reference/common/2.19.0/classgoogle_1_1cloud_1_1Location)\n- [2.18.0](/cpp/docs/reference/common/2.18.0/classgoogle_1_1cloud_1_1Location)\n- [2.17.0](/cpp/docs/reference/common/2.17.0/classgoogle_1_1cloud_1_1Location)\n- [2.16.0](/cpp/docs/reference/common/2.16.0/classgoogle_1_1cloud_1_1Location)\n- [2.15.1](/cpp/docs/reference/common/2.15.1/classgoogle_1_1cloud_1_1Location)\n- [2.14.0](/cpp/docs/reference/common/2.14.0/classgoogle_1_1cloud_1_1Location)\n- [2.13.0](/cpp/docs/reference/common/2.13.0/classgoogle_1_1cloud_1_1Location)\n- [2.12.0](/cpp/docs/reference/common/2.12.0/classgoogle_1_1cloud_1_1Location)\n- [2.11.0](/cpp/docs/reference/common/2.11.0/classgoogle_1_1cloud_1_1Location)\n- [2.10.1](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1Location) \nA representation of a Cloud [Location](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Location). \nA Cloud location is identified by its `project_id` and `location_id`.\n\n\u003cbr /\u003e\n\n| **Note:** This class makes no effort to validate the components of the location name. It is the application's responsibility to provide valid project and location ids. Passing invalid values will not be checked until the location name is used in an RPC.\nFor more info about locations, see \u003chttps://cloud.google.com/about/locations\u003e\n\n\u003cbr /\u003e\n\nConstructors\n------------\n\n### Location(Location const \\&)\n\nCopy and move\n\n### Location(Location \\&\\&)\n\nCopy and move\n\n### Location(Project, std::string)\n\nConstructs a [Location](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Location) object identified by the given `project` and `location_id`.\n\n### Location(std::string, std::string)\n\nConstructs a Location_id object identified by the given IDs. \nThis is equivalent to first constructing a [`Project`](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project) from the given `project_id` and then calling the [`Location(Project, std::string)`](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Location#classgoogle_1_1cloud_1_1Location_1abb6f670c08b832799bd5535b6d8b9571) constructor.\n\nOperators\n---------\n\n### operator=(Location const \\&)\n\nCopy and move\n\n### operator=(Location \\&\\&)\n\nCopy and move\n\nFunctions\n---------\n\n### project() const\n\nReturns the [`Project`](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project) containing this location.\n\n### project_id() const\n\n### location_id() const\n\nReturns the [Location](/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Location) ID.\n\n### FullName() const\n\nReturns the fully qualified location name as a string of the form: \"projects/"]]