Skip to main content

plugins_style_guide

Creates, updates, deletes, gets or lists a plugins_style_guide resource.

Overview

Nameplugins_style_guide
TypeResource
Idgoogle.apihub.plugins_style_guide

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the style guide. Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
contentsobjectRequired. Input only. The contents of the uploaded style guide. (id: GoogleCloudApihubV1StyleGuideContents)
linterstringRequired. Target linter for the style guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_style_guideselectprojectsId, locationsId, pluginsIdGet the style guide being used for linting.
update_style_guideupdateprojectsId, locationsId, pluginsIdupdateMaskUpdate the styleGuide to be used for liniting in by API hub.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
pluginsIdstring
projectsIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Get the style guide being used for linting.

SELECT
name,
contents,
linter
FROM google.apihub.plugins_style_guide
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pluginsId = '{{ pluginsId }}' -- required;

UPDATE examples

Update the styleGuide to be used for liniting in by API hub.

UPDATE google.apihub.plugins_style_guide
SET
data__name = '{{ name }}',
data__linter = '{{ linter }}',
data__contents = '{{ contents }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND pluginsId = '{{ pluginsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
contents,
linter;