* $computeService = new Google\Service\Compute(...); * $licenseCodes = $computeService->licenseCodes; * */ class LicenseCodes extends \Google\Service\Resource { /** * Return a specified license code. License codes are mirrored across all * projects that have permissions to read the License Code. *Caution* This * resource is intended for use only by third-party partners who are creating * Cloud Marketplace images. (licenseCodes.get) * * @param string $project Project ID for this request. * @param string $licenseCode Number corresponding to the License code resource * to return. * @param array $optParams Optional parameters. * @return LicenseCode */ public function get($project, $licenseCode, $optParams = []) { $params = ['project' => $project, 'licenseCode' => $licenseCode]; $params = array_merge($params, $optParams); return $this->call('get', [$params], LicenseCode::class); } /** * Returns permissions that a caller has on the specified resource. *Caution* * This resource is intended for use only by third-party partners who are * creating Cloud Marketplace images. (licenseCodes.testIamPermissions) * * @param string $project Project ID for this request. * @param string $resource Name or id of the resource for this request. * @param TestPermissionsRequest $postBody * @param array $optParams Optional parameters. * @return TestPermissionsResponse */ public function testIamPermissions($project, $resource, TestPermissionsRequest $postBody, $optParams = []) { $params = ['project' => $project, 'resource' => $resource, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('testIamPermissions', [$params], TestPermissionsResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(LicenseCodes::class, 'Google_Service_Compute_Resource_LicenseCodes');