[[["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\u003eThis document outlines the \u003ccode\u003eLocation\u003c/code\u003e class in the Google Cloud C++ client library, specifically version 2.19.0, and also provides links to other versions, including the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eLocation\u003c/code\u003e object represents a Cloud location, identified by a \u003ccode\u003eproject_id\u003c/code\u003e and \u003ccode\u003elocation_id\u003c/code\u003e, without built-in validation of these components.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides multiple constructors for creating a \u003ccode\u003eLocation\u003c/code\u003e object, including methods to copy and move, and accept a project alongside a string, or a \u003ccode\u003eproject_id\u003c/code\u003e with a \u003ccode\u003elocation_id\u003c/code\u003e string.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods to retrieve the \u003ccode\u003eProject\u003c/code\u003e, \u003ccode\u003eproject_id\u003c/code\u003e, \u003ccode\u003elocation_id\u003c/code\u003e, and the fully qualified location name using the \u003ccode\u003eproject()\u003c/code\u003e, \u003ccode\u003eproject_id()\u003c/code\u003e, \u003ccode\u003elocation_id()\u003c/code\u003e, and \u003ccode\u003eFullName()\u003c/code\u003e functions respectively.\u003c/p\u003e\n"],["\u003cp\u003eThere is information in the documentation concerning the use of copy and move operators that are available with the \u003ccode\u003eLocation\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,["# Class Location (2.19.0)\n\nVersion 2.19.0keyboard_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/2.19.0/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/2.19.0/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/2.19.0/classgoogle_1_1cloud_1_1Project) from the given `project_id` and then calling the [`Location(Project, std::string)`](/cpp/docs/reference/common/2.19.0/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/2.19.0/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/2.19.0/classgoogle_1_1cloud_1_1Location) ID.\n\n### FullName() const\n\nReturns the fully qualified location name as a string of the form: \"projects/"]]