* $mybusinessbusinessinformationService = new Google\Service\MyBusinessBusinessInformation(...); * $locations = $mybusinessbusinessinformationService->locations; * */ class Locations extends \Google\Service\Resource { /** * Associates a location to a place ID. Any previous association is overwritten. * This operation is only valid if the location is unverified. The association * must be valid, that is, it appears in the list of `SearchGoogleLocations`. * (locations.associate) * * @param string $name Required. The resource name of the location to associate. * @param AssociateLocationRequest $postBody * @param array $optParams Optional parameters. * @return MybusinessbusinessinformationEmpty */ public function associate($name, AssociateLocationRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('associate', [$params], MybusinessbusinessinformationEmpty::class); } /** * Clears an association between a location and its place ID. This operation is * only valid if the location is unverified. * (locations.clearLocationAssociation) * * @param string $name Required. The resource name of the location to * disassociate. * @param ClearLocationAssociationRequest $postBody * @param array $optParams Optional parameters. * @return MybusinessbusinessinformationEmpty */ public function clearLocationAssociation($name, ClearLocationAssociationRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('clearLocationAssociation', [$params], MybusinessbusinessinformationEmpty::class); } /** * Deletes a location. If this location cannot be deleted using the API and it * is marked so in the `google.mybusiness.businessinformation.v1.LocationState`, * use the [Google Business Profile](https://business.google.com/manage/) * website. (locations.delete) * * @param string $name Required. The name of the location to delete. * @param array $optParams Optional parameters. * @return MybusinessbusinessinformationEmpty */ public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], MybusinessbusinessinformationEmpty::class); } /** * Returns the specified location. (locations.get) * * @param string $name Required. The name of the location to fetch. * @param array $optParams Optional parameters. * * @opt_param string readMask Required. Read mask to specify what fields will be * returned in the response. * @return Location */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], Location::class); } /** * Looks up all the attributes set for a given location. * (locations.getAttributes) * * @param string $name Required. Google identifier for this location in the form * of `locations/{location_id}/attributes`. * @param array $optParams Optional parameters. * @return Attributes */ public function getAttributes($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('getAttributes', [$params], AttributesModel::class); } /** * Gets the Google-updated version of the specified location. * (locations.getGoogleUpdated) * * @param string $name Required. The name of the location to fetch. * @param array $optParams Optional parameters. * * @opt_param string readMask Required. Read mask to specify what fields will be * returned in the response. * @return GoogleUpdatedLocation */ public function getGoogleUpdated($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('getGoogleUpdated', [$params], GoogleUpdatedLocation::class); } /** * Updates the specified location. (locations.patch) * * @param string $name Google identifier for this location in the form: * `locations/{location_id}`. * @param Location $postBody * @param array $optParams Optional parameters. * * @opt_param string updateMask Required. The specific fields to update. * @opt_param bool validateOnly Optional. If true, the request is validated * without actually updating the location. When this field is set, we will only * return validation errors if there were any. The response will be empty if no * errors were found. * @return Location */ public function patch($name, Location $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], Location::class); } /** * Update attributes for a given location. (locations.updateAttributes) * * @param string $name Required. Google identifier for this location in the form * of `locations/{location_id}/attributes`. * @param AttributesModel $postBody * @param array $optParams Optional parameters. * * @opt_param string attributeMask Required. Attribute name of attributes that * you'd like to update. Represented by `attributes/{attribute}`. Updates: All * attributes provided in the attributes field that you would like to update * must be set in the `attribute_mask`. Attributes set in the above list but not * in the `attribute_mask` will be ignored. Deletes: If you'd like to delete * certain attributes, they must be specified in the `attribute_mask` with no * matching entry in the attributes list. If you'd like to delete all attributes * set on a location, you should look up all the applicable attributes for the * location and then add them to the `attribute_mask` with an empty attributes * field. * @return AttributesModel */ public function updateAttributes($name, AttributesModel $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('updateAttributes', [$params], AttributesModel::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Locations::class, 'Google_Service_MyBusinessBusinessInformation_Resource_Locations');