From 2f9a84a08e224959063af2de862d04efd53a08c9 Mon Sep 17 00:00:00 2001 From: shrutiparabgoogle <78754132+shrutiparabgoogle@users.noreply.github.com> Date: Fri, 17 Jun 2022 13:27:47 -0700 Subject: [PATCH] Start using official styleguide protos in v1 (#614) * Start using official styleguide protos * Start using official styleguide protos * Small fixes for mime_type strings * Run addlicense * test fixes --- .codecov.yml | 14 + .github/.in-solidarity.yml | 14 + cmd/registry/cmd/apply/apply_test.go | 2 +- .../testdata/sample/artifacts/styleguide.yaml | 24 + cmd/registry/cmd/compute/conformance.go | 4 +- cmd/registry/cmd/compute/conformance_test.go | 145 ++-- .../testdata/styleguide-multiple-linter.yaml | 4 +- .../styleguide-multiple-severity.yaml | 2 +- ...us.yaml => styleguide-multiple-state.yaml} | 6 +- .../cmd/compute/testdata/styleguide.yaml | 2 +- cmd/registry/cmd/upload/styleguide.go | 5 +- cmd/registry/cmd/upload/styleguide_test.go | 2 +- .../testdata/apispec-extension-list.yaml | 14 + .../cmd/upload/testdata/styleguide.yaml | 2 +- cmd/registry/conformance/conformance-task.go | 47 +- .../conformance/conformance-task_test.go | 159 ++-- cmd/registry/conformance/linter_test.go | 72 +- cmd/registry/controller/controller_test.go | 8 +- cmd/registry/core/print.go | 6 +- cmd/registry/patch/artifact.go | 24 +- cmd/registry/scoring/extensions/extensions.go | 14 + .../scoring/extensions/extensions_test.go | 14 + cmd/registry/scoring/extensions/validators.go | 14 + .../scoring/extensions/validators_test.go | 14 + deployments/envoy/Dockerfile | 14 + .../registry_conformance_report.proto | 110 --- .../applications/v1alpha1/registry_lint.proto | 147 ---- .../v1alpha1/registry_styleguide.proto | 163 ---- .../v1/apihub/display_settings.proto | 14 + .../apigeeregistry/v1/apihub/extensions.proto | 14 + .../apigeeregistry/v1/apihub/lifecycle.proto | 14 + .../apigeeregistry/v1/apihub/references.proto | 14 + .../apigeeregistry/v1/apihub/taxonomies.proto | 14 + .../v1/style/conformance_report.proto | 100 +++ .../cloud/apigeeregistry/v1/style/lint.proto | 163 ++++ .../apigeeregistry/v1/style/style_guide.proto | 134 ++++ openapi.yaml | 14 + rpc/conformance_report.pb.go | 587 +++++++++++++++ rpc/{registry_lint.pb.go => lint.pb.go} | 444 ++++++----- rpc/registry_conformance_report.pb.go | 600 --------------- rpc/registry_styleguide.pb.go | 708 ------------------ rpc/style_guide.pb.go | 630 ++++++++++++++++ tools/PROTOS.sh | 1 + 43 files changed, 2344 insertions(+), 2153 deletions(-) create mode 100644 cmd/registry/cmd/apply/testdata/sample/artifacts/styleguide.yaml rename cmd/registry/cmd/compute/testdata/{styleguide-multiple-status.yaml => styleguide-multiple-state.yaml} (95%) delete mode 100644 google/cloud/apigeeregistry/applications/v1alpha1/registry_conformance_report.proto delete mode 100644 google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto delete mode 100644 google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto create mode 100644 google/cloud/apigeeregistry/v1/style/conformance_report.proto create mode 100644 google/cloud/apigeeregistry/v1/style/lint.proto create mode 100644 google/cloud/apigeeregistry/v1/style/style_guide.proto create mode 100644 rpc/conformance_report.pb.go rename rpc/{registry_lint.pb.go => lint.pb.go} (51%) delete mode 100644 rpc/registry_conformance_report.pb.go delete mode 100644 rpc/registry_styleguide.pb.go create mode 100644 rpc/style_guide.pb.go diff --git a/.codecov.yml b/.codecov.yml index 65aedccdf..52d979fe6 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + coverage: precision: 2 round: down diff --git a/.github/.in-solidarity.yml b/.github/.in-solidarity.yml index 697a57d19..7c8f1aa9c 100644 --- a/.github/.in-solidarity.yml +++ b/.github/.in-solidarity.yml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + rules: ignore: - ".github/in-solidarity.yml" diff --git a/cmd/registry/cmd/apply/apply_test.go b/cmd/registry/cmd/apply/apply_test.go index f12a2c218..cb5056c29 100644 --- a/cmd/registry/cmd/apply/apply_test.go +++ b/cmd/registry/cmd/apply/apply_test.go @@ -101,7 +101,7 @@ func TestApply(t *testing.T) { // TODO: These should run as separate subtests to make it clear exactly which artifact types are failing. // Creation and export should also be separated ideally. The error message should at least make it // clear whether create or export is failing. - artifacts := []string{"lifecycle", "manifest", "taxonomies"} + artifacts := []string{"lifecycle", "manifest", "taxonomies", "styleguide"} for _, a := range artifacts { filename := fmt.Sprintf("%s/artifacts/%s.yaml", sampleDir, a) cmd := Command() diff --git a/cmd/registry/cmd/apply/testdata/sample/artifacts/styleguide.yaml b/cmd/registry/cmd/apply/testdata/sample/artifacts/styleguide.yaml new file mode 100644 index 000000000..8d8e5b976 --- /dev/null +++ b/cmd/registry/cmd/apply/testdata/sample/artifacts/styleguide.yaml @@ -0,0 +1,24 @@ +apiVersion: apigeeregistry/v1 +kind: StyleGuide +metadata: + name: styleguide +data: + displayName: StyleGuide + mimeTypes: + - application/x.openapi+gzip;version=2 + guidelines: + - id: refproperties + displayName: Govern Ref Properties + description: This guideline governs properties for ref fields on specs. + rules: + - id: norefsiblings + displayName: No Ref Siblings + description: An object exposing a $ref property cannot be further extended with additional properties. + linter: spectral + linterRulename: no-$ref-siblings + severity: ERROR + docUri: https://meta.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#no-ref-siblings + state: ACTIVE + linters: + - name: spectral + uri: https://github.com/stoplightio/spectral diff --git a/cmd/registry/cmd/compute/conformance.go b/cmd/registry/cmd/compute/conformance.go index cffc933d8..36d93a49e 100644 --- a/cmd/registry/cmd/compute/conformance.go +++ b/cmd/registry/cmd/compute/conformance.go @@ -16,9 +16,11 @@ package compute import ( "context" + "fmt" "github.com/apigee/registry/cmd/registry/conformance" "github.com/apigee/registry/cmd/registry/core" + "github.com/apigee/registry/cmd/registry/patch" "github.com/apigee/registry/connection" "github.com/apigee/registry/log" "github.com/apigee/registry/rpc" @@ -27,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" ) -const styleguideFilter = "mime_type.contains('google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide')" +var styleguideFilter = fmt.Sprintf("mime_type.contains('%s')", patch.MimeTypeForKind("StyleGuide")) func conformanceCommand() *cobra.Command { cmd := &cobra.Command{ diff --git a/cmd/registry/cmd/compute/conformance_test.go b/cmd/registry/cmd/compute/conformance_test.go index 6b2df93a7..0684f4df7 100644 --- a/cmd/registry/cmd/compute/conformance_test.go +++ b/cmd/registry/cmd/compute/conformance_test.go @@ -55,19 +55,20 @@ func TestConformance(t *testing.T) { getPattern string wantProto *rpc.ConformanceReport }{ - //Tests the normal use case with one guideline defined with status: ACTIVE and one Rule defined with severity:ERROR + //Tests the normal use case with one guideline defined with state: ACTIVE and one Rule defined with severity:ERROR { desc: "normal case", conformancePath: filepath.Join("testdata", "styleguide.yaml"), getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest", wantProto: &rpc.ConformanceReport{ - Name: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest", - StyleguideName: "openapitest", + Id: "conformance-openapitest", + Kind: "ConformanceReport", + Styleguide: "projects/conformance-test/locations/global/artifacts/openapitest", GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -77,8 +78,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "norefsiblings", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "norefsiblings", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -89,22 +90,23 @@ func TestConformance(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, - //Tests if default status and severity values are assigned properly in the absence of defined values + //Tests if default state and severity values are assigned properly in the absence of defined values { desc: "default case", conformancePath: filepath.Join("testdata", "styleguide-default.yaml"), getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-default", wantProto: &rpc.ConformanceReport{ - Name: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-default", - StyleguideName: "openapitest-default", + Id: "conformance-openapitest-default", + Kind: "ConformanceReport", + Styleguide: "projects/conformance-test/locations/global/artifacts/openapitest-default", GuidelineReportGroups: []*rpc.GuidelineReportGroup{ { - Status: rpc.Guideline_STATUS_UNSPECIFIED, + State: rpc.Guideline_STATE_UNSPECIFIED, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -113,8 +115,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_SEVERITY_UNSPECIFIED, RuleReports: []*rpc.RuleReport{ { - RuleId: "norefsiblings", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "norefsiblings", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -126,10 +128,10 @@ func TestConformance(t *testing.T) { }, }, }, - {Status: rpc.Guideline_PROPOSED}, - {Status: rpc.Guideline_ACTIVE}, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_ACTIVE}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -139,13 +141,14 @@ func TestConformance(t *testing.T) { conformancePath: filepath.Join("testdata", "styleguide-multiple-severity.yaml"), getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-severity", wantProto: &rpc.ConformanceReport{ - Name: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-severity", - StyleguideName: "openapitest-multiple-severity", + Id: "conformance-openapitest-multiple-severity", + Kind: "ConformanceReport", + Styleguide: "projects/conformance-test/locations/global/artifacts/openapitest-multiple-severity", GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "tagproperties", @@ -155,12 +158,12 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "operationtags", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "operationtags", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, { - RuleId: "operationtagdefined", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "operationtagdefined", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -169,12 +172,12 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_INFO, RuleReports: []*rpc.RuleReport{ { - RuleId: "openapitags", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "openapitags", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, { - RuleId: "openapitagsalphabetical", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "openapitagsalphabetical", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -183,23 +186,24 @@ func TestConformance(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, - //Tests if multiple status entries are populated correctly in severity report + //Tests if multiple state entries are populated correctly in severity report { - desc: "multiple status", - conformancePath: filepath.Join("testdata", "styleguide-multiple-status.yaml"), - getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-status", + desc: "multiple state", + conformancePath: filepath.Join("testdata", "styleguide-multiple-state.yaml"), + getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-state", wantProto: &rpc.ConformanceReport{ - Name: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-status", - StyleguideName: "openapitest-multiple-status", + Id: "conformance-openapitest-multiple-state", + Kind: "ConformanceReport", + Styleguide: "projects/conformance-test/locations/global/artifacts/openapitest-multiple-state", GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, { - Status: rpc.Guideline_PROPOSED, + State: rpc.Guideline_PROPOSED, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "tagproperties", @@ -209,8 +213,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "operationtags", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "operationtags", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -219,8 +223,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_INFO, RuleReports: []*rpc.RuleReport{ { - RuleId: "openapitags", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "openapitags", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -230,7 +234,7 @@ func TestConformance(t *testing.T) { }, }, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -240,8 +244,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "norefsiblings", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "norefsiblings", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -252,8 +256,8 @@ func TestConformance(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -263,12 +267,13 @@ func TestConformance(t *testing.T) { conformancePath: filepath.Join("testdata", "styleguide-multiple-linter.yaml"), getPattern: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-linter", wantProto: &rpc.ConformanceReport{ - Name: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml/artifacts/conformance-openapitest-multiple-linter", - StyleguideName: "openapitest-multiple-linter", + Id: "conformance-openapitest-multiple-linter", + Kind: "ConformanceReport", + Styleguide: "projects/conformance-test/locations/global/artifacts/openapitest-multiple-linter", GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, { - Status: rpc.Guideline_PROPOSED, + State: rpc.Guideline_PROPOSED, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "descriptionproperties", @@ -278,12 +283,12 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "operationdescription", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "operationdescription", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, { - RuleId: "infodescription", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "infodescription", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -291,8 +296,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_WARNING, RuleReports: []*rpc.RuleReport{ { - RuleId: "descriptiontags", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "descriptiontags", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -300,8 +305,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_INFO, RuleReports: []*rpc.RuleReport{ { - RuleId: "tagdescription", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "tagdescription", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -311,7 +316,7 @@ func TestConformance(t *testing.T) { }, }, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -321,8 +326,8 @@ func TestConformance(t *testing.T) { Severity: rpc.Rule_ERROR, RuleReports: []*rpc.RuleReport{ { - RuleId: "norefsiblings", - SpecName: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", + RuleId: "norefsiblings", + Spec: "projects/conformance-test/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml", }, }, }, @@ -333,8 +338,8 @@ func TestConformance(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -452,7 +457,7 @@ func TestConformance(t *testing.T) { } opts := cmp.Options{ - protocmp.IgnoreFields(&rpc.RuleReport{}, "file_name", "suggestion", "location"), + protocmp.IgnoreFields(&rpc.RuleReport{}, "file", "suggestion", "location"), protocmp.Transform(), cmpopts.SortSlices(func(a, b string) bool { return a < b }), } diff --git a/cmd/registry/cmd/compute/testdata/styleguide-multiple-linter.yaml b/cmd/registry/cmd/compute/testdata/styleguide-multiple-linter.yaml index 54825aaa8..d57aba252 100644 --- a/cmd/registry/cmd/compute/testdata/styleguide-multiple-linter.yaml +++ b/cmd/registry/cmd/compute/testdata/styleguide-multiple-linter.yaml @@ -25,7 +25,7 @@ guidelines: linter: sample linter_rulename: no-$ref-siblings severity: ERROR - status: ACTIVE + state: ACTIVE - id: descriptionproperties display_name: Description Properties description: This guideline specifies rules for different tags. @@ -50,7 +50,7 @@ guidelines: linter: openapi-sample linter_rulename: description-contains-no-tags severity: WARNING - status: PROPOSED + state: PROPOSED linters: - name: sample uri: https://sample/url diff --git a/cmd/registry/cmd/compute/testdata/styleguide-multiple-severity.yaml b/cmd/registry/cmd/compute/testdata/styleguide-multiple-severity.yaml index 9e3028180..c26b30ba2 100644 --- a/cmd/registry/cmd/compute/testdata/styleguide-multiple-severity.yaml +++ b/cmd/registry/cmd/compute/testdata/styleguide-multiple-severity.yaml @@ -40,7 +40,7 @@ guidelines: linter: sample linter_rulename: operation-tag-defined severity: ERROR - status: ACTIVE + state: ACTIVE linters: - name: sample uri: https://sample/url diff --git a/cmd/registry/cmd/compute/testdata/styleguide-multiple-status.yaml b/cmd/registry/cmd/compute/testdata/styleguide-multiple-state.yaml similarity index 95% rename from cmd/registry/cmd/compute/testdata/styleguide-multiple-status.yaml rename to cmd/registry/cmd/compute/testdata/styleguide-multiple-state.yaml index fa4985a61..73e06ffe7 100644 --- a/cmd/registry/cmd/compute/testdata/styleguide-multiple-status.yaml +++ b/cmd/registry/cmd/compute/testdata/styleguide-multiple-state.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -id: openapitest-multiple-status +id: openapitest-multiple-state mime_types: - application/x.openapi+gzip;version=3.0.0 guidelines: @@ -25,7 +25,7 @@ guidelines: linter: sample linter_rulename: no-$ref-siblings severity: ERROR - status: ACTIVE + state: ACTIVE - id: tagproperties display_name: Tag Properties description: This guideline specifies rules for different tags. @@ -40,7 +40,7 @@ guidelines: linter: sample linter_rulename: operation-tags severity: ERROR - status: PROPOSED + state: PROPOSED linters: - name: sample uri: https://sample/url diff --git a/cmd/registry/cmd/compute/testdata/styleguide.yaml b/cmd/registry/cmd/compute/testdata/styleguide.yaml index b3d3241b7..a5a0ce480 100644 --- a/cmd/registry/cmd/compute/testdata/styleguide.yaml +++ b/cmd/registry/cmd/compute/testdata/styleguide.yaml @@ -25,7 +25,7 @@ guidelines: linter: sample linter_rulename: no-$ref-siblings severity: ERROR - status: ACTIVE + state: ACTIVE linters: - name: sample uri: https://sample/url diff --git a/cmd/registry/cmd/upload/styleguide.go b/cmd/registry/cmd/upload/styleguide.go index 5571f1ba7..da29d8885 100644 --- a/cmd/registry/cmd/upload/styleguide.go +++ b/cmd/registry/cmd/upload/styleguide.go @@ -19,6 +19,7 @@ import ( "os" "github.com/apigee/registry/cmd/registry/core" + "github.com/apigee/registry/cmd/registry/patch" "github.com/apigee/registry/connection" "github.com/apigee/registry/log" "github.com/apigee/registry/rpc" @@ -81,9 +82,7 @@ func styleGuideCommand() *cobra.Command { projectID + "/locations/global/artifacts/" + styleGuide.GetId(), - MimeType: core.MimeTypeForMessageType( - "google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide", - ), + MimeType: patch.MimeTypeForKind("StyleGuide"), Contents: styleGuideMarshalled, } log.Debugf(ctx, "Uploading %s", artifact.Name) diff --git a/cmd/registry/cmd/upload/styleguide_test.go b/cmd/registry/cmd/upload/styleguide_test.go index e27991d12..504de48ec 100644 --- a/cmd/registry/cmd/upload/styleguide_test.go +++ b/cmd/registry/cmd/upload/styleguide_test.go @@ -58,7 +58,7 @@ func TestStyleGuideUpload(t *testing.T) { Severity: rpc.Rule_ERROR, }, }, - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, }, }, Linters: []*rpc.Linter{ diff --git a/cmd/registry/cmd/upload/testdata/apispec-extension-list.yaml b/cmd/registry/cmd/upload/testdata/apispec-extension-list.yaml index 98c585731..22a23a80a 100644 --- a/cmd/registry/cmd/upload/testdata/apispec-extension-list.yaml +++ b/cmd/registry/cmd/upload/testdata/apispec-extension-list.yaml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + id: test-extension-list kind: "ApiSpecExtensionList" display_name: "Test Extension List" diff --git a/cmd/registry/cmd/upload/testdata/styleguide.yaml b/cmd/registry/cmd/upload/testdata/styleguide.yaml index cb8274a37..fbb5994e9 100644 --- a/cmd/registry/cmd/upload/testdata/styleguide.yaml +++ b/cmd/registry/cmd/upload/testdata/styleguide.yaml @@ -25,7 +25,7 @@ guidelines: linter: spectral linter_rulename: no-$ref-siblings severity: ERROR - status: ACTIVE + state: ACTIVE linters: - name: spectral uri: https://github.com/stoplightio/spectral diff --git a/cmd/registry/conformance/conformance-task.go b/cmd/registry/conformance/conformance-task.go index 9db3c0058..9a756ad42 100644 --- a/cmd/registry/conformance/conformance-task.go +++ b/cmd/registry/conformance/conformance-task.go @@ -24,30 +24,33 @@ import ( "time" "github.com/apigee/registry/cmd/registry/core" + "github.com/apigee/registry/cmd/registry/patch" "github.com/apigee/registry/connection" "github.com/apigee/registry/log" "github.com/apigee/registry/rpc" + "github.com/apigee/registry/server/registry/names" "google.golang.org/protobuf/proto" ) -func conformanceReportName(specName, styleguideName string) string { - return fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideName) +func conformanceReportId(styleguideId string) string { + return fmt.Sprintf("conformance-%s", styleguideId) } -func initializeConformanceReport(specName, styleguideId string) *rpc.ConformanceReport { +func initializeConformanceReport(specName, styleguideId, project string) *rpc.ConformanceReport { // Create an empty conformance report. conformanceReport := &rpc.ConformanceReport{ - Name: conformanceReportName(specName, styleguideId), - StyleguideName: styleguideId, + Id: conformanceReportId(styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), } // Initialize guideline report groups. - guidelineStatus := rpc.Guideline_Status(0) - numStatuses := guidelineStatus.Descriptor().Values().Len() - conformanceReport.GuidelineReportGroups = make([]*rpc.GuidelineReportGroup, numStatuses) - for i := 0; i < numStatuses; i++ { + guidelineState := rpc.Guideline_State(0) + numStates := guidelineState.Descriptor().Values().Len() + conformanceReport.GuidelineReportGroups = make([]*rpc.GuidelineReportGroup, numStates) + for i := 0; i < numStates; i++ { conformanceReport.GuidelineReportGroups[i] = &rpc.GuidelineReportGroup{ - Status: rpc.Guideline_Status(i), + State: rpc.Guideline_State(i), GuidelineReports: make([]*rpc.GuidelineReport, 0), } } @@ -82,11 +85,11 @@ type ComputeConformanceTask struct { } func (task *ComputeConformanceTask) String() string { - return fmt.Sprintf("compute %s", conformanceReportName(task.Spec.GetName(), task.StyleguideId)) + return fmt.Sprintf("compute %s/artifacts/%s", task.Spec.GetName(), conformanceReportId(task.StyleguideId)) } func (task *ComputeConformanceTask) Run(ctx context.Context) error { - log.Debugf(ctx, "Computing conformance report %s", conformanceReportName(task.Spec.GetName(), task.StyleguideId)) + log.Debugf(ctx, "Computing conformance report %s/artifacts/%s", task.Spec.GetName(), conformanceReportId(task.StyleguideId)) data, err := core.GetBytesForSpec(ctx, task.Client, task.Spec) if err != nil { @@ -110,8 +113,14 @@ func (task *ComputeConformanceTask) Run(ctx context.Context) error { return err } + // Get project + spec, err := names.ParseSpec(task.Spec.GetName()) + if err != nil { + return err + } + // Run the linters and compute conformance report - conformanceReport := initializeConformanceReport(task.Spec.GetName(), task.StyleguideId) + conformanceReport := initializeConformanceReport(task.Spec.GetName(), task.StyleguideId, spec.ProjectID) guidelineReportsMap := make(map[string]int) for _, metadata := range task.LintersMetadata { linterResponse, err := task.invokeLinter(ctx, root, metadata) @@ -208,7 +217,7 @@ func (task *ComputeConformanceTask) computeConformanceReport( guidelineReport := initializeGuidelineReport(guideline.GetId()) // Create a new entry in the conformance report - guidelineGroup := conformanceReport.GuidelineReportGroups[guideline.GetStatus()] + guidelineGroup := conformanceReport.GuidelineReportGroups[guideline.GetState()] guidelineGroup.GuidelineReports = append(guidelineGroup.GuidelineReports, guidelineReport) // Store the index of this new entry in the map @@ -218,13 +227,13 @@ func (task *ComputeConformanceTask) computeConformanceReport( ruleReport := &rpc.RuleReport{ RuleId: guidelineRule.GetId(), - SpecName: task.Spec.GetName(), - FileName: filepath.Base(lintFile.GetFilePath()), + Spec: task.Spec.GetName(), + File: filepath.Base(lintFile.GetFilePath()), Suggestion: problem.Suggestion, Location: problem.Location, } // Add the rule report to the appropriate guideline report. - guidelineGroup := conformanceReport.GuidelineReportGroups[guideline.GetStatus()] + guidelineGroup := conformanceReport.GuidelineReportGroups[guideline.GetState()] if reportIndex >= len(guidelineGroup.GuidelineReports) { log.Errorf(ctx, "Incorrect data in conformance report. Cannot attach entry for %s", guideline.GetId()) continue @@ -245,8 +254,8 @@ func (task *ComputeConformanceTask) storeConformanceReport( } artifact := &rpc.Artifact{ - Name: conformanceReportName(task.Spec.GetName(), task.StyleguideId), - MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.applications.v1alpha1.ConformanceReport"), + Name: fmt.Sprintf("%s/artifacts/%s", task.Spec.GetName(), conformanceReportId(task.StyleguideId)), + MimeType: patch.MimeTypeForKind("ConformanceReport"), Contents: messageData, } return core.SetArtifact(ctx, task.Client, artifact) diff --git a/cmd/registry/conformance/conformance-task_test.go b/cmd/registry/conformance/conformance-task_test.go index 466d9a721..9d1b84f59 100644 --- a/cmd/registry/conformance/conformance-task_test.go +++ b/cmd/registry/conformance/conformance-task_test.go @@ -25,39 +25,41 @@ import ( "google.golang.org/protobuf/testing/protocmp" ) +const project = "demo" const specName = "projects/demo/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml" const styleguideId = "openapi-test" // This test will catch any changes made to the original status values. func TestInitializeConformanceReport(t *testing.T) { want := &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ { - Status: rpc.Guideline_STATUS_UNSPECIFIED, + State: rpc.Guideline_STATE_UNSPECIFIED, GuidelineReports: make([]*rpc.GuidelineReport, 0), }, { - Status: rpc.Guideline_PROPOSED, + State: rpc.Guideline_PROPOSED, GuidelineReports: make([]*rpc.GuidelineReport, 0), }, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: make([]*rpc.GuidelineReport, 0), }, { - Status: rpc.Guideline_DEPRECATED, + State: rpc.Guideline_DEPRECATED, GuidelineReports: make([]*rpc.GuidelineReport, 0), }, { - Status: rpc.Guideline_DISABLED, + State: rpc.Guideline_DISABLED, GuidelineReports: make([]*rpc.GuidelineReport, 0), }, }, } - got := initializeConformanceReport(specName, styleguideId) + got := initializeConformanceReport(specName, styleguideId, project) opts := cmp.Options{ protocmp.Transform(), cmpopts.SortSlices(func(a, b string) bool { return a < b }), @@ -146,20 +148,21 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_ERROR, }, guideline: &rpc.Guideline{ - Id: "refproperties", - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + State: rpc.Guideline_ACTIVE, }, }, }, }, wantReport: &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -170,8 +173,8 @@ func TestComputeConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "norefsiblings", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix no-$ref-siblings", Location: &rpc.LintLocation{ StartPosition: &rpc.LintPosition{LineNumber: 11, ColumnNumber: 25}, @@ -187,8 +190,8 @@ func TestComputeConformanceReport(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -227,20 +230,21 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_ERROR, }, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + State: rpc.Guideline_ACTIVE, }, }, }, }, wantReport: &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "descriptionproperties", @@ -251,8 +255,8 @@ func TestComputeConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "operationdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix operation-description", }, }, @@ -264,8 +268,8 @@ func TestComputeConformanceReport(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -319,8 +323,8 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_ERROR, }, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + State: rpc.Guideline_ACTIVE, }, }, "tag-description": { @@ -329,8 +333,8 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_WARNING, }, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + State: rpc.Guideline_ACTIVE, }, }, "info-description": { @@ -339,8 +343,8 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_WARNING, }, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + State: rpc.Guideline_ACTIVE, }, }, "no-$ref-siblings": { @@ -349,19 +353,20 @@ func TestComputeConformanceReport(t *testing.T) { Severity: rpc.Rule_ERROR, }, guideline: &rpc.Guideline{ - Id: "refproperties", - Status: rpc.Guideline_PROPOSED, + Id: "refproperties", + State: rpc.Guideline_PROPOSED, }, }, }, }, wantReport: &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, { - Status: rpc.Guideline_PROPOSED, + State: rpc.Guideline_PROPOSED, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "refproperties", @@ -372,8 +377,8 @@ func TestComputeConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "norefsiblings", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix no-$ref-siblings", }, }, @@ -386,7 +391,7 @@ func TestComputeConformanceReport(t *testing.T) { }, }, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "descriptionproperties", @@ -397,8 +402,8 @@ func TestComputeConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "operationdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix operation-description", }, }, @@ -408,14 +413,14 @@ func TestComputeConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "tagdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix tag-description", }, { RuleId: "infodescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix info-description", }, }, @@ -426,8 +431,8 @@ func TestComputeConformanceReport(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, }, }, @@ -442,7 +447,7 @@ func TestComputeConformanceReport(t *testing.T) { StyleguideId: styleguideId, } - gotReport := initializeConformanceReport(task.Spec.GetName(), task.StyleguideId) + gotReport := initializeConformanceReport(task.Spec.GetName(), task.StyleguideId, project) guidelineReportsMap := make(map[string]int) task.computeConformanceReport(ctx, gotReport, guidelineReportsMap, test.linterResponse, test.linterMetadata) @@ -488,21 +493,22 @@ func TestPreExistingConformanceReport(t *testing.T) { Severity: rpc.Rule_ERROR, }, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + State: rpc.Guideline_ACTIVE, }, }, }, } preexistingReport := &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "descriptionproperties", @@ -513,8 +519,8 @@ func TestPreExistingConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "tagdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix tag-description", }, }, @@ -526,8 +532,8 @@ func TestPreExistingConformanceReport(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, } @@ -536,13 +542,14 @@ func TestPreExistingConformanceReport(t *testing.T) { } wantReport := &rpc.ConformanceReport{ - Name: fmt.Sprintf("%s/artifacts/conformance-%s", specName, styleguideId), - StyleguideName: styleguideId, + Id: fmt.Sprintf("conformance-%s", styleguideId), + Kind: "ConformanceReport", + Styleguide: fmt.Sprintf("projects/%s/locations/global/artifacts/%s", project, styleguideId), GuidelineReportGroups: []*rpc.GuidelineReportGroup{ - {Status: rpc.Guideline_STATUS_UNSPECIFIED}, - {Status: rpc.Guideline_PROPOSED}, + {State: rpc.Guideline_STATE_UNSPECIFIED}, + {State: rpc.Guideline_PROPOSED}, { - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, GuidelineReports: []*rpc.GuidelineReport{ { GuidelineId: "descriptionproperties", @@ -553,14 +560,14 @@ func TestPreExistingConformanceReport(t *testing.T) { RuleReports: []*rpc.RuleReport{ { RuleId: "tagdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix tag-description", }, { RuleId: "operationdescription", - SpecName: specName, - FileName: "test-result-file", + Spec: specName, + File: "test-result-file", Suggestion: "fix operation-description", }, }, @@ -572,8 +579,8 @@ func TestPreExistingConformanceReport(t *testing.T) { }, }, }, - {Status: rpc.Guideline_DEPRECATED}, - {Status: rpc.Guideline_DISABLED}, + {State: rpc.Guideline_DEPRECATED}, + {State: rpc.Guideline_DISABLED}, }, } diff --git a/cmd/registry/conformance/linter_test.go b/cmd/registry/conformance/linter_test.go index b469a0ee0..1dbbb876d 100644 --- a/cmd/registry/conformance/linter_test.go +++ b/cmd/registry/conformance/linter_test.go @@ -58,9 +58,9 @@ func TestGenerateLinterMetadata(t *testing.T) { MimeTypes: []string{"application/x.openapi+gzip;version=3.0.0"}, Guidelines: []*rpc.Guideline{ { - Id: "refproperties", - Rules: []*rpc.Rule{noRefSiblingsRule}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{noRefSiblingsRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -72,9 +72,9 @@ func TestGenerateLinterMetadata(t *testing.T) { noRefSiblingsRule.GetLinterRulename(): { guidelineRule: noRefSiblingsRule, guideline: &rpc.Guideline{ - Id: "refproperties", - Rules: []*rpc.Rule{noRefSiblingsRule}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{noRefSiblingsRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -88,9 +88,9 @@ func TestGenerateLinterMetadata(t *testing.T) { MimeTypes: []string{"application/x.openapi+gzip;version=3.0.0"}, Guidelines: []*rpc.Guideline{ { - Id: "descriptionproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -102,9 +102,9 @@ func TestGenerateLinterMetadata(t *testing.T) { noRefSiblingsRule.GetLinterRulename(): { guidelineRule: noRefSiblingsRule, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -116,9 +116,9 @@ func TestGenerateLinterMetadata(t *testing.T) { noRefCyclesRule.GetLinterRulename(): { guidelineRule: noRefCyclesRule, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "descriptionproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -132,14 +132,14 @@ func TestGenerateLinterMetadata(t *testing.T) { MimeTypes: []string{"application/x.openapi+gzip;version=3.0.0"}, Guidelines: []*rpc.Guideline{ { - Id: "refproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, { - Id: "descriptionproperties", - Rules: []*rpc.Rule{operaationDescriptionRule}, - Status: rpc.Guideline_PROPOSED, + Id: "descriptionproperties", + Rules: []*rpc.Rule{operaationDescriptionRule}, + State: rpc.Guideline_PROPOSED, }, }, }, @@ -151,9 +151,9 @@ func TestGenerateLinterMetadata(t *testing.T) { noRefSiblingsRule.GetLinterRulename(): { guidelineRule: noRefSiblingsRule, guideline: &rpc.Guideline{ - Id: "refproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -165,17 +165,17 @@ func TestGenerateLinterMetadata(t *testing.T) { noRefCyclesRule.GetLinterRulename(): { guidelineRule: noRefCyclesRule, guideline: &rpc.Guideline{ - Id: "refproperties", - Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{noRefSiblingsRule, noRefCyclesRule}, + State: rpc.Guideline_ACTIVE, }, }, operaationDescriptionRule.GetLinterRulename(): { guidelineRule: operaationDescriptionRule, guideline: &rpc.Guideline{ - Id: "descriptionproperties", - Rules: []*rpc.Rule{operaationDescriptionRule}, - Status: rpc.Guideline_PROPOSED, + Id: "descriptionproperties", + Rules: []*rpc.Rule{operaationDescriptionRule}, + State: rpc.Guideline_PROPOSED, }, }, }, @@ -189,9 +189,9 @@ func TestGenerateLinterMetadata(t *testing.T) { MimeTypes: []string{"application/x.openapi+gzip;version=3.0.0"}, Guidelines: []*rpc.Guideline{ { - Id: "refproperties", - Rules: []*rpc.Rule{}, - Status: rpc.Guideline_ACTIVE, + Id: "refproperties", + Rules: []*rpc.Rule{}, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -213,7 +213,7 @@ func TestGenerateLinterMetadata(t *testing.T) { Severity: rpc.Rule_ERROR, }, }, - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -236,7 +236,7 @@ func TestGenerateLinterMetadata(t *testing.T) { }, noRefCyclesRule, }, - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, }, }, }, @@ -257,7 +257,7 @@ func TestGenerateLinterMetadata(t *testing.T) { }, noRefCyclesRule, }, - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, }, }, }, diff --git a/cmd/registry/controller/controller_test.go b/cmd/registry/controller/controller_test.go index 5b0526044..985177aca 100644 --- a/cmd/registry/controller/controller_test.go +++ b/cmd/registry/controller/controller_test.go @@ -49,7 +49,7 @@ var styleguide = &rpc.StyleGuide{ Severity: rpc.Rule_WARNING, }, }, - Status: rpc.Guideline_ACTIVE, + State: rpc.Guideline_ACTIVE, }, }, } @@ -804,7 +804,7 @@ func TestMultipleEntitiesArtifacts(t *testing.T) { seed: []seeder.RegistryResource{ &rpc.Artifact{ Name: "projects/controller-test/locations/global/artifacts/registry-styleguide", - MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide"), + MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.v1.style.StyleGuide"), Contents: protoMarshal(styleguide), }, &rpc.ApiSpec{ @@ -850,7 +850,7 @@ func TestMultipleEntitiesArtifacts(t *testing.T) { //Update styleguide definition to make sure conformance artifacts are outdated &rpc.Artifact{ Name: "projects/controller-test/locations/global/artifacts/registry-styleguide", - MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide"), + MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.v1.style.StyleGuide"), Contents: protoMarshal(styleguide), }, }, @@ -877,7 +877,7 @@ func TestMultipleEntitiesArtifacts(t *testing.T) { seed: []seeder.RegistryResource{ &rpc.Artifact{ Name: "projects/controller-test/locations/global/artifacts/registry-styleguide", - MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide"), + MimeType: core.MimeTypeForMessageType("google.cloud.apigeeregistry.v1.style.StyleGuide"), Contents: protoMarshal(styleguide), }, &rpc.ApiSpec{ diff --git a/cmd/registry/core/print.go b/cmd/registry/core/print.go index 58e0d7e91..7867aed24 100644 --- a/cmd/registry/core/print.go +++ b/cmd/registry/core/print.go @@ -115,8 +115,6 @@ func PrintArtifactContents(artifact *rpc.Artifact) error { return unmarshalAndPrint(artifact.GetContents(), &metrics.Vocabulary{}) case "gnostic.metrics.VersionHistory": return unmarshalAndPrint(artifact.GetContents(), &metrics.VersionHistory{}) - case "google.cloud.apigeeregistry.applications.v1alpha1.ConformanceReport": - return unmarshalAndPrint(artifact.GetContents(), &rpc.ConformanceReport{}) case "google.cloud.apigeeregistry.applications.v1alpha1.Index": return unmarshalAndPrint(artifact.GetContents(), &rpc.Index{}) case "google.cloud.apigeeregistry.applications.v1alpha1.Lint": @@ -145,7 +143,9 @@ func PrintArtifactContents(artifact *rpc.Artifact) error { return unmarshalAndPrint(artifact.GetContents(), &rpc.ScoreDefinition{}) case "google.cloud.apigeeregistry.v1.scoring.ScoreCardDefinition": return unmarshalAndPrint(artifact.GetContents(), &rpc.ScoreCardDefinition{}) - case "google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide": + case "google.cloud.apigeeregistry.v1.style.ConformanceReport": + return unmarshalAndPrint(artifact.GetContents(), &rpc.ConformanceReport{}) + case "google.cloud.apigeeregistry.v1.style.StyleGuide": return unmarshalAndPrint(artifact.GetContents(), &rpc.StyleGuide{}) case "gnostic.openapiv2.Document": return unmarshalAndPrint(artifact.GetContents(), &openapiv2.Document{}) diff --git a/cmd/registry/patch/artifact.go b/cmd/registry/patch/artifact.go index 53418d25d..db6646773 100644 --- a/cmd/registry/patch/artifact.go +++ b/cmd/registry/patch/artifact.go @@ -272,15 +272,17 @@ type messageFactory func() proto.Message // artifactMessageTypes is the single source of truth for artifact types that can be represented in YAML. var artifactMessageTypes map[string]messageFactory = map[string]messageFactory{ - "google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide": func() proto.Message { return new(rpc.StyleGuide) }, - "google.cloud.apigeeregistry.v1.apihub.ApiSpecExtensionList": func() proto.Message { return new(rpc.ApiSpecExtensionList) }, - "google.cloud.apigeeregistry.v1.apihub.DisplaySettings": func() proto.Message { return new(rpc.DisplaySettings) }, - "google.cloud.apigeeregistry.v1.apihub.Lifecycle": func() proto.Message { return new(rpc.Lifecycle) }, - "google.cloud.apigeeregistry.v1.apihub.ReferenceList": func() proto.Message { return new(rpc.ReferenceList) }, - "google.cloud.apigeeregistry.v1.apihub.TaxonomyList": func() proto.Message { return new(rpc.TaxonomyList) }, - "google.cloud.apigeeregistry.v1.controller.Manifest": func() proto.Message { return new(rpc.Manifest) }, - "google.cloud.apigeeregistry.v1.scoring.Score": func() proto.Message { return new(rpc.Score) }, - "google.cloud.apigeeregistry.v1.scoring.ScoreDefinition": func() proto.Message { return new(rpc.ScoreDefinition) }, - "google.cloud.apigeeregistry.v1.scoring.ScoreCard": func() proto.Message { return new(rpc.ScoreCard) }, - "google.cloud.apigeeregistry.v1.scoring.ScoreCardDefinition": func() proto.Message { return new(rpc.ScoreCardDefinition) }, + "google.cloud.apigeeregistry.v1.apihub.ApiSpecExtensionList": func() proto.Message { return new(rpc.ApiSpecExtensionList) }, + "google.cloud.apigeeregistry.v1.apihub.DisplaySettings": func() proto.Message { return new(rpc.DisplaySettings) }, + "google.cloud.apigeeregistry.v1.apihub.Lifecycle": func() proto.Message { return new(rpc.Lifecycle) }, + "google.cloud.apigeeregistry.v1.apihub.ReferenceList": func() proto.Message { return new(rpc.ReferenceList) }, + "google.cloud.apigeeregistry.v1.apihub.TaxonomyList": func() proto.Message { return new(rpc.TaxonomyList) }, + "google.cloud.apigeeregistry.v1.controller.Manifest": func() proto.Message { return new(rpc.Manifest) }, + "google.cloud.apigeeregistry.v1.scoring.Score": func() proto.Message { return new(rpc.Score) }, + "google.cloud.apigeeregistry.v1.scoring.ScoreDefinition": func() proto.Message { return new(rpc.ScoreDefinition) }, + "google.cloud.apigeeregistry.v1.scoring.ScoreCard": func() proto.Message { return new(rpc.ScoreCard) }, + "google.cloud.apigeeregistry.v1.scoring.ScoreCardDefinition": func() proto.Message { return new(rpc.ScoreCardDefinition) }, + "google.cloud.apigeeregistry.v1.style.StyleGuide": func() proto.Message { return new(rpc.StyleGuide) }, + "google.cloud.apigeeregistry.v1.style.ConformanceReport": func() proto.Message { return new(rpc.ConformanceReport) }, + "google.cloud.apigeeregistry.v1.style.Lint": func() proto.Message { return new(rpc.Lint) }, } diff --git a/cmd/registry/scoring/extensions/extensions.go b/cmd/registry/scoring/extensions/extensions.go index c68a574a0..50a91e0c7 100644 --- a/cmd/registry/scoring/extensions/extensions.go +++ b/cmd/registry/scoring/extensions/extensions.go @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package extensions import ( diff --git a/cmd/registry/scoring/extensions/extensions_test.go b/cmd/registry/scoring/extensions/extensions_test.go index 07167520e..3555ba3ac 100644 --- a/cmd/registry/scoring/extensions/extensions_test.go +++ b/cmd/registry/scoring/extensions/extensions_test.go @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package extensions import ( diff --git a/cmd/registry/scoring/extensions/validators.go b/cmd/registry/scoring/extensions/validators.go index 668181829..0ffe3c3e4 100644 --- a/cmd/registry/scoring/extensions/validators.go +++ b/cmd/registry/scoring/extensions/validators.go @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package extensions import ( diff --git a/cmd/registry/scoring/extensions/validators_test.go b/cmd/registry/scoring/extensions/validators_test.go index 3080efa00..ccdbdd96c 100644 --- a/cmd/registry/scoring/extensions/validators_test.go +++ b/cmd/registry/scoring/extensions/validators_test.go @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package extensions import ( diff --git a/deployments/envoy/Dockerfile b/deployments/envoy/Dockerfile index 1215eb58b..f4c1e0133 100644 --- a/deployments/envoy/Dockerfile +++ b/deployments/envoy/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + ARG ENVOY_VERSION=v1.20-latest ARG GO_VERSION=1.18 diff --git a/google/cloud/apigeeregistry/applications/v1alpha1/registry_conformance_report.proto b/google/cloud/apigeeregistry/applications/v1alpha1/registry_conformance_report.proto deleted file mode 100644 index f15e32181..000000000 --- a/google/cloud/apigeeregistry/applications/v1alpha1/registry_conformance_report.proto +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.apigeeregistry.applications.v1alpha1; - -import "google/api/field_behavior.proto"; -import "google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto"; -import "google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto"; - -option java_package = "com.google.cloud.apigeeregistry.applications.v1alpha1"; -option java_multiple_files = true; -option java_outer_classname = "RegistryConformanceReportProto"; -option go_package = "github.com/apigee/registry/rpc;rpc"; - -// ConformanceReport describes how well an API Spec or a series of -// API Specs conform to a specific API Style guide. -message ConformanceReport { - // Resource name of the conformance report. - string name = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Name of the style guide that this report pertains to. - string styleguide_name = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A list of guideline report groups. - repeated GuidelineReportGroup guideline_report_groups = 3; -} - -// GuidelineReport describes how well an API Spec or a series of -// API Specs conform to a guideline within an API Style Guide. -message GuidelineReport { - // ID of the guideline that this report pertains to. - string guideline_id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A list of rule report groups. - repeated RuleReportGroup rule_report_groups = 2; -} - -// RuleReport provides information and feedback on a rule that -// a spec breaches within a guideline on an API Style Guide. -message RuleReport { - // ID of the rule that the spec breaches. - string rule_id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Resource name of the spec that the rule was breached on. - string spec_name = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - - // File name of the spec that the rule was breached on. - string file_name = 3 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A suggestion for resolving the problem. - string suggestion = 4; - - // The location of the problem in the spec file. - LintLocation location = 5; -} - -// GuidelineReportGroup is an abstraction that maps status -// (PROPOSED, ACTIVE, DEPRECATED, DISABLED) to a list of -// guideline reports for guidelines of that status. -message GuidelineReportGroup { - // Status of the guidelines in this report group. - Guideline.Status status = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A list of guideline reports. - repeated GuidelineReport guideline_reports = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -// RuleReportGroup is an abstraction that maps severity -// (ERROR WARNING, INFO, HINT) to a list of rule reports for -// rules of that severity. -message RuleReportGroup { - // Severity of the rules in this report group. - Rule.Severity severity = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A list of rule reports. - repeated RuleReport rule_reports = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} diff --git a/google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto b/google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto deleted file mode 100644 index aabe1348c..000000000 --- a/google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2020 Google LLC. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.apigeeregistry.applications.v1alpha1; - -option java_package = "com.google.cloud.apigeeregistry.applications.v1alpha1"; -option java_multiple_files = true; -option java_outer_classname = "RegistryLintProto"; -option go_package = "github.com/apigee/registry/rpc;rpc"; - -// Lint wraps the result of a linter run for an API. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message Lint { - // The name of the result. - string name = 1; - - // The lint results for each file examined. - repeated LintFile files = 2; -} - -// LintFile wraps the result of a linter run for a file. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintFile { - // The path of the file linted. - string file_path = 1; - - // The problems found when the file was linted. - repeated LintProblem problems = 2; -} - -// LintProblem represents a problem found by a linter. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintProblem { - // A message describing the problem. - string message = 1; - - // An identifier for a related design rule. - string rule_id = 2; - - // A link for a related design rule. - string rule_doc_uri = 3; - - // A suggestion for resolving the problem. - string suggestion = 4; - - // The location in the file of the problem. - LintLocation location = 5; -} - -// LintLocation represents a range of text in a file. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintLocation { - // The initial position of a problem. - LintPosition start_position = 1; - - // The end position of a problem. - LintPosition end_position = 2; -} - -// LintPosition represents a point in a file. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintPosition { - // A line number in a file. - int32 line_number = 1; - - // A column number in a file. - int32 column_number = 2; -} - -// LintStats summarizes linter results. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintStats { - // A sum of the total operations (GET, POST, PUT, DELETE). - int32 operation_count = 1; - - // The number of schemas contained under this resource. - int32 schema_count = 2; - - // Problems found in linting. - repeated LintProblemCount problem_counts = 3; -} - -// LintProblemCount represents the number of times a problem was found in linting. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LintProblemCount { - // The number of occurrences of the problem. - int32 count = 1; - - // An identifier for the related design rule. - string rule_id = 2; - - // A link for the related design rule. - string rule_doc_uri = 3; -} - -// LinterRequest represents a request to a linter plugin. The plugin will lint -// the provided spec based on rules that have been enabled. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LinterRequest { - // This specifies a directory containing the files of the spec that need to - // be linted. This path is relative to the directory where the plugin is run. - string spec_directory = 1; - - // A list of rules that need to be enabled when linting this spec. - // If no rules are specified, all of the linter's rules should be enabled. - repeated string rule_ids = 2; -} - -// LinterResponse represents a response returned from a linter plugin. It contains a -// list of problems that were identified by the linter. -// (-- api-linter: core::0123::resource-annotation=disabled -// aip.dev/not-precedent: This message is not currently used in an API. --) -message LinterResponse { - // Error message. If non-empty, the plugin failed. - // The plugin process should exit with status code zero even if it reports - // an error in this way. - // - // This should be used to indicate errors which prevent - // the plugin from operating as intended. Errors which indicate a problem in the - // linter itself should be reported by writing a message to stderr and exiting - // with a non-zero status code. - repeated string errors = 1; - - // The problems found when the file was linted. - Lint lint = 2; -} diff --git a/google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto b/google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto deleted file mode 100644 index 4c5ae7ba6..000000000 --- a/google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.apigeeregistry.applications.v1alpha1; - -import "google/api/field_behavior.proto"; - -option java_package = "com.google.cloud.apigeeregistry.applications.v1alpha1"; -option java_multiple_files = true; -option java_outer_classname = "RegistryStyleGuideProto"; -option go_package = "github.com/apigee/registry/rpc;rpc"; - -// StyleGuide defines a set of guidelines and linters that govern the -// static analysis of API Specs with specified mime types. -message StyleGuide { - // Identifier of the style guide. - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Human-meaningful name of the style guide. - string display_name = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - - // This field lists the MIME types of the specs that the style guide applies to. - // It is a list containing style (format) descriptors that are specified - // as a Media Type (https://en.wikipedia.org/wiki/Media_type). - // Possible values include "application/vnd.apigee.proto", - // "application/vnd.apigee.openapi", and "application/vnd.apigee.graphql", - // with possible suffixes representing compression types. These hypothetical - // names are defined in the vendor tree defined in RFC6838 - // (https://tools.ietf.org/html/rfc6838) and are not final. - repeated string mime_types = 3 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A list of guidelines that are specified by this style guide. - repeated Guideline guidelines = 4; - - // A list of linters that this style guide uses. - repeated Linter linters = 5; -} - -// Guideline defines a set of rules that achieve a common design -// goal for API specs. -message Guideline { - // Identifier of the guideline. - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Human-meaningful name of the guideline. - string display_name = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A detailed description of the guideline. - string description = 3; - - // A list of rules that this guideline specifies. - repeated Rule rules = 4; - - // Possible severities for this guideline. - enum Status { - // The default value, unused. - STATUS_UNSPECIFIED = 0; - - // The guideline is being proposed, and shouldn't yet - // be enforced. - PROPOSED = 1; - - // The guideline is active and should be enforced. - ACTIVE = 2; - - // The guideline is deprecated as of the recent version, - // and shouldn't be enforced. - DEPRECATED = 3; - - // The guideline has been disabled and shouldn't be enforced. - DISABLED = 4; - } - // Indicates the status of the guideline. - Status status = 5; -} - -// Rule is a specific design rule that can be applied to an API spec, -// and is enforced by a specified linter. -message Rule { - // Identifier of the rule. - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Human-meaningful name of the rule. - string display_name = 2; - - // A detailed description of the rule. - string description = 3; - - // Name of the linter that enforces this rule. - string linter = 4 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Name of the rule on the linter that enforces it. - string linter_rulename = 5 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Possible severities for the violation of a rule. - enum Severity { - // The default value, unused. - SEVERITY_UNSPECIFIED = 0; - - // Violation of the rule is an error that must be fixed. - ERROR = 1; - - // Violation of the rule is a pattern that is wrong, - // and should be warned about. - WARNING = 2; - - // Violation of the rule is not necessarily a bad pattern - // or error, but information the user should be aware of. - INFO = 3; - - // Violation of the rule is a hint that is provided to - // the user to fix their spec's design. - HINT = 4; - } - // Severity of violating this rule. - Severity severity = 6; - - // A link to additional documentation relating to this rule. - string doc_uri = 7; -} - -// Linter contains the name and source code / documentation of specific -// linter that a style guide uses. -message Linter { - // Name of the linter. - string name = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // A uri to the linter source code or documentation. - string uri = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} diff --git a/google/cloud/apigeeregistry/v1/apihub/display_settings.proto b/google/cloud/apigeeregistry/v1/apihub/display_settings.proto index e48531047..abda82beb 100644 --- a/google/cloud/apigeeregistry/v1/apihub/display_settings.proto +++ b/google/cloud/apigeeregistry/v1/apihub/display_settings.proto @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; // (-- api-linter: core::0215::versioned-packages=disabled diff --git a/google/cloud/apigeeregistry/v1/apihub/extensions.proto b/google/cloud/apigeeregistry/v1/apihub/extensions.proto index 5c7e3acbb..c40b2128b 100644 --- a/google/cloud/apigeeregistry/v1/apihub/extensions.proto +++ b/google/cloud/apigeeregistry/v1/apihub/extensions.proto @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; // (-- api-linter: core::0215::versioned-packages=disabled diff --git a/google/cloud/apigeeregistry/v1/apihub/lifecycle.proto b/google/cloud/apigeeregistry/v1/apihub/lifecycle.proto index bfc15124a..b3495a2e0 100644 --- a/google/cloud/apigeeregistry/v1/apihub/lifecycle.proto +++ b/google/cloud/apigeeregistry/v1/apihub/lifecycle.proto @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; // (-- api-linter: core::0215::versioned-packages=disabled diff --git a/google/cloud/apigeeregistry/v1/apihub/references.proto b/google/cloud/apigeeregistry/v1/apihub/references.proto index 23bf9ab67..60ea7a178 100644 --- a/google/cloud/apigeeregistry/v1/apihub/references.proto +++ b/google/cloud/apigeeregistry/v1/apihub/references.proto @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; // (-- api-linter: core::0215::versioned-packages=disabled diff --git a/google/cloud/apigeeregistry/v1/apihub/taxonomies.proto b/google/cloud/apigeeregistry/v1/apihub/taxonomies.proto index 4f8f0c276..dd0dd4e56 100644 --- a/google/cloud/apigeeregistry/v1/apihub/taxonomies.proto +++ b/google/cloud/apigeeregistry/v1/apihub/taxonomies.proto @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; // (-- api-linter: core::0215::versioned-packages=disabled diff --git a/google/cloud/apigeeregistry/v1/style/conformance_report.proto b/google/cloud/apigeeregistry/v1/style/conformance_report.proto new file mode 100644 index 000000000..7d45f4b5f --- /dev/null +++ b/google/cloud/apigeeregistry/v1/style/conformance_report.proto @@ -0,0 +1,100 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) + +package google.cloud.apigeeregistry.v1.style; + +import "google/api/field_behavior.proto"; +import "google/cloud/apigeeregistry/v1/style/lint.proto"; +import "google/cloud/apigeeregistry/v1/style/style_guide.proto"; + +option java_package = "com.google.cloud.apigeeregistry.v1.style"; +option java_multiple_files = true; +option java_outer_classname = "ConformanceReportProto"; +option go_package = "github.com/apigee/registry/rpc;rpc"; + +// ConformanceReport describes how well an API Spec or a series of +// API Specs conform to a specific API Style guide. +message ConformanceReport { + // Artifact identifier. This will be auto-generated based on the id of the + // StyleGuide used to calculate this. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Artifact kind. May be used in YAML representations to identify the type of + // this artifact. + string kind = 2; + + // Full resource name of the StyleGuide artifact which was used + // to generate this report. + string styleguide = 3 [(google.api.field_behavior) = REQUIRED]; + + // A list of guideline report groups. + repeated GuidelineReportGroup guideline_report_groups = 4; +} + +// GuidelineReport describes how well an API Spec or a series of +// API Specs conform to a guideline within an API Style Guide. +message GuidelineReport { + // ID of the guideline that this report pertains to. + string guideline_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of rule report groups. + repeated RuleReportGroup rule_report_groups = 2; +} + +// RuleReport provides information and feedback on a rule that +// a spec breaches within a guideline on an API Style Guide. +message RuleReport { + // ID of the rule that the spec breaches. + string rule_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Resource name of the spec that the rule was breached on. + string spec = 2 [(google.api.field_behavior) = REQUIRED]; + + // File name of the spec that the rule was breached on. + string file = 3 [(google.api.field_behavior) = REQUIRED]; + + // A suggestion for resolving the problem. + string suggestion = 4; + + // The location of the problem in the spec file. + LintLocation location = 5; +} + +// GuidelineReportGroup is an abstraction that maps state +// (PROPOSED, ACTIVE, DEPRECATED, DISABLED) to a list of +// guideline reports for guidelines of that state. +message GuidelineReportGroup { + // State of the guidelines in this report group. + Guideline.State state = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of guideline reports. + repeated GuidelineReport guideline_reports = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// RuleReportGroup is an abstraction that maps severity +// (ERROR WARNING, INFO, HINT) to a list of rule reports for +// rules of that severity. +message RuleReportGroup { + // Severity of the rules in this report group. + Rule.Severity severity = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of rule reports. + repeated RuleReport rule_reports = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/apigeeregistry/v1/style/lint.proto b/google/cloud/apigeeregistry/v1/style/lint.proto new file mode 100644 index 000000000..51e720fd3 --- /dev/null +++ b/google/cloud/apigeeregistry/v1/style/lint.proto @@ -0,0 +1,163 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) +package google.cloud.apigeeregistry.v1.style; + +import "google/api/field_behavior.proto"; + +option java_package = "com.google.cloud.apigeeregistry.v1.style"; +option java_multiple_files = true; +option java_outer_classname = "LintProto"; +option go_package = "github.com/apigee/registry/rpc;rpc"; + +// Lint wraps the result of a linter run for an API. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message Lint { + // The name of the result. + string name = 1; + + // The lint results for each file examined. + repeated LintFile files = 2; +} + +// LintFile wraps the result of a linter run for a file. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintFile { + // The path of the file linted. + string file_path = 1; + + // The problems found when the file was linted. + repeated LintProblem problems = 2; +} + +// LintProblem represents a problem found by a linter. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintProblem { + // A message describing the problem. + string message = 1; + + // An identifier for a related design rule. + string rule_id = 2; + + // A link for a related design rule. + string rule_doc_uri = 3; + + // A suggestion for resolving the problem. + string suggestion = 4; + + // The location in the file of the problem. + LintLocation location = 5; +} + +// LintLocation represents a range of text in a file. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintLocation { + // The initial position of a problem. + LintPosition start_position = 1; + + // The end position of a problem. + LintPosition end_position = 2; +} + +// LintPosition represents a point in a file. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintPosition { + // A line number in a file. + int32 line_number = 1; + + // A column number in a file. + int32 column_number = 2; +} + +// LintStats summarizes linter results. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintStats { + // A sum of the total operations (GET, POST, PUT, DELETE). + int32 operation_count = 1; + + // The number of schemas contained under this resource. + int32 schema_count = 2; + + // Problems found in linting. + repeated LintProblemCount problem_counts = 3; +} + +// LintProblemCount represents the number of times a problem was found in +// linting. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LintProblemCount { + // The number of occurrences of the problem. + int32 count = 1; + + // An identifier for the related design rule. + string rule_id = 2; + + // A link for the related design rule. + string rule_doc_uri = 3; +} + +// LinterRequest represents a request to a linter plugin. The plugin will lint +// the provided spec based on rules that have been enabled. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LinterRequest { + // This specifies a directory containing the files of the spec that need to + // be linted. This path is relative to the directory where the plugin is run. + string spec_directory = 1; + + // A list of rules that need to be enabled when linting this spec. + // If no rules are specified, all of the linter's rules should be enabled. + repeated string rule_ids = 2; +} + +// LinterResponse represents a response returned from a linter plugin. It +// contains a list of problems that were identified by the linter. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message LinterResponse { + // Error message. If non-empty, the plugin failed. + // The plugin process should exit with status code zero even if it reports + // an error in this way. + // + // This should be used to indicate errors which prevent + // the plugin from operating as intended. Errors which indicate a problem in + // the linter itself should be reported by writing a message to stderr and + // exiting with a non-zero status code. + repeated string errors = 1; + + // The problems found when the file was linted. + Lint lint = 2; +} + +// Linter contains the name and source code / documentation of specific linter. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +message Linter { + // Name of the linter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // A uri to the linter source code or documentation. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/google/cloud/apigeeregistry/v1/style/style_guide.proto b/google/cloud/apigeeregistry/v1/style/style_guide.proto new file mode 100644 index 000000000..2407f476e --- /dev/null +++ b/google/cloud/apigeeregistry/v1/style/style_guide.proto @@ -0,0 +1,134 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) +package google.cloud.apigeeregistry.v1.style; + +import "google/api/field_behavior.proto"; +import "google/cloud/apigeeregistry/v1/style/lint.proto"; + +option java_package = "com.google.cloud.apigeeregistry.v1.style"; +option java_multiple_files = true; +option java_outer_classname = "StyleGuideProto"; +option go_package = "github.com/apigee/registry/rpc;rpc"; + +// StyleGuide defines a set of guidelines and linters that govern the +// static analysis of API Specs with specified mime types. +message StyleGuide { + // Identifier of the style guide. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Artifact kind. May be used in YAML representations to identify the type of + // this artifact. + string kind = 2; + + // Human-meaningful name of the style guide. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // This field lists the MIME types of the specs that the style guide applies + // to. It is a list containing style (format) descriptors that are specified + // as a Media Type (https://en.wikipedia.org/wiki/Media_type). + // Possible values include "application/vnd.apigee.proto", + // "application/vnd.apigee.openapi", and "application/vnd.apigee.graphql", + // with possible suffixes representing compression types. These hypothetical + // names are defined in the vendor tree defined in RFC6838 + // (https://tools.ietf.org/html/rfc6838) and are not final. + repeated string mime_types = 4 [(google.api.field_behavior) = REQUIRED]; + + // A list of guidelines that are specified by this style guide. + repeated Guideline guidelines = 5; + + // A list of linters that this style guide uses. + repeated Linter linters = 6; +} + +// Guideline defines a set of rules that achieve a common design +// goal for API specs. +message Guideline { + // Identifier of the guideline. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Human-meaningful name of the guideline. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // A detailed description of the guideline. + string description = 3; + + // A list of rules that this guideline specifies. + repeated Rule rules = 4; + + // Possible states for this guideline. + enum State { + // The default value, unused. + STATE_UNSPECIFIED = 0; + // The guideline is being proposed, and shouldn't yet + // be enforced. + PROPOSED = 1; + // The guideline is active and should be enforced. + ACTIVE = 2; + // The guideline is deprecated as of the recent version, + // and shouldn't be enforced. + DEPRECATED = 3; + // The guideline has been disabled and shouldn't be enforced. + DISABLED = 4; + } + + // Indicates the state of the guideline. + State state = 5; +} + +// Rule is a specific design rule that can be applied to an API spec, +// and is enforced by a specified linter. +message Rule { + // Identifier of the rule. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Human-meaningful name of the rule. + string display_name = 2; + + // A detailed description of the rule. + string description = 3; + + // Name of the linter that enforces this rule. + string linter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Name of the rule on the linter that enforces it. + string linter_rulename = 5 [(google.api.field_behavior) = REQUIRED]; + + // Possible severities for the violation of a rule. + enum Severity { + // The default value, unused. + SEVERITY_UNSPECIFIED = 0; + // Violation of the rule is an error that must be fixed. + ERROR = 1; + // Violation of the rule is a pattern that is wrong, + // and should be warned about. + WARNING = 2; + // Violation of the rule is not necessarily a bad pattern + // or error, but information the user should be aware of. + INFO = 3; + // Violation of the rule is a hint that is provided to + // the user to fix their spec's design. + HINT = 4; + } + + // Severity of violating this rule. + Severity severity = 6; + + // A link to additional documentation relating to this rule. + string doc_uri = 7; +} diff --git a/openapi.yaml b/openapi.yaml index cd358f323..a2faa28bc 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi diff --git a/rpc/conformance_report.pb.go b/rpc/conformance_report.pb.go new file mode 100644 index 000000000..568662149 --- /dev/null +++ b/rpc/conformance_report.pb.go @@ -0,0 +1,587 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.1 +// source: google/cloud/apigeeregistry/v1/style/conformance_report.proto + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) + +package rpc + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ConformanceReport describes how well an API Spec or a series of +// API Specs conform to a specific API Style guide. +type ConformanceReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Artifact identifier. This will be auto-generated based on the id of the + // StyleGuide used to calculate this. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Artifact kind. May be used in YAML representations to identify the type of + // this artifact. + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + // Full resource name of the StyleGuide artifact which was used + // to generate this report. + Styleguide string `protobuf:"bytes,3,opt,name=styleguide,proto3" json:"styleguide,omitempty"` + // A list of guideline report groups. + GuidelineReportGroups []*GuidelineReportGroup `protobuf:"bytes,4,rep,name=guideline_report_groups,json=guidelineReportGroups,proto3" json:"guideline_report_groups,omitempty"` +} + +func (x *ConformanceReport) Reset() { + *x = ConformanceReport{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConformanceReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConformanceReport) ProtoMessage() {} + +func (x *ConformanceReport) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConformanceReport.ProtoReflect.Descriptor instead. +func (*ConformanceReport) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP(), []int{0} +} + +func (x *ConformanceReport) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ConformanceReport) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ConformanceReport) GetStyleguide() string { + if x != nil { + return x.Styleguide + } + return "" +} + +func (x *ConformanceReport) GetGuidelineReportGroups() []*GuidelineReportGroup { + if x != nil { + return x.GuidelineReportGroups + } + return nil +} + +// GuidelineReport describes how well an API Spec or a series of +// API Specs conform to a guideline within an API Style Guide. +type GuidelineReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the guideline that this report pertains to. + GuidelineId string `protobuf:"bytes,1,opt,name=guideline_id,json=guidelineId,proto3" json:"guideline_id,omitempty"` + // A list of rule report groups. + RuleReportGroups []*RuleReportGroup `protobuf:"bytes,2,rep,name=rule_report_groups,json=ruleReportGroups,proto3" json:"rule_report_groups,omitempty"` +} + +func (x *GuidelineReport) Reset() { + *x = GuidelineReport{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GuidelineReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuidelineReport) ProtoMessage() {} + +func (x *GuidelineReport) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GuidelineReport.ProtoReflect.Descriptor instead. +func (*GuidelineReport) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP(), []int{1} +} + +func (x *GuidelineReport) GetGuidelineId() string { + if x != nil { + return x.GuidelineId + } + return "" +} + +func (x *GuidelineReport) GetRuleReportGroups() []*RuleReportGroup { + if x != nil { + return x.RuleReportGroups + } + return nil +} + +// RuleReport provides information and feedback on a rule that +// a spec breaches within a guideline on an API Style Guide. +type RuleReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the rule that the spec breaches. + RuleId string `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"` + // Resource name of the spec that the rule was breached on. + Spec string `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // File name of the spec that the rule was breached on. + File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` + // A suggestion for resolving the problem. + Suggestion string `protobuf:"bytes,4,opt,name=suggestion,proto3" json:"suggestion,omitempty"` + // The location of the problem in the spec file. + Location *LintLocation `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *RuleReport) Reset() { + *x = RuleReport{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuleReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuleReport) ProtoMessage() {} + +func (x *RuleReport) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuleReport.ProtoReflect.Descriptor instead. +func (*RuleReport) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP(), []int{2} +} + +func (x *RuleReport) GetRuleId() string { + if x != nil { + return x.RuleId + } + return "" +} + +func (x *RuleReport) GetSpec() string { + if x != nil { + return x.Spec + } + return "" +} + +func (x *RuleReport) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *RuleReport) GetSuggestion() string { + if x != nil { + return x.Suggestion + } + return "" +} + +func (x *RuleReport) GetLocation() *LintLocation { + if x != nil { + return x.Location + } + return nil +} + +// GuidelineReportGroup is an abstraction that maps state +// (PROPOSED, ACTIVE, DEPRECATED, DISABLED) to a list of +// guideline reports for guidelines of that state. +type GuidelineReportGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // State of the guidelines in this report group. + State Guideline_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.apigeeregistry.v1.style.Guideline_State" json:"state,omitempty"` + // A list of guideline reports. + GuidelineReports []*GuidelineReport `protobuf:"bytes,2,rep,name=guideline_reports,json=guidelineReports,proto3" json:"guideline_reports,omitempty"` +} + +func (x *GuidelineReportGroup) Reset() { + *x = GuidelineReportGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GuidelineReportGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuidelineReportGroup) ProtoMessage() {} + +func (x *GuidelineReportGroup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GuidelineReportGroup.ProtoReflect.Descriptor instead. +func (*GuidelineReportGroup) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP(), []int{3} +} + +func (x *GuidelineReportGroup) GetState() Guideline_State { + if x != nil { + return x.State + } + return Guideline_STATE_UNSPECIFIED +} + +func (x *GuidelineReportGroup) GetGuidelineReports() []*GuidelineReport { + if x != nil { + return x.GuidelineReports + } + return nil +} + +// RuleReportGroup is an abstraction that maps severity +// (ERROR WARNING, INFO, HINT) to a list of rule reports for +// rules of that severity. +type RuleReportGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Severity of the rules in this report group. + Severity Rule_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.v1.style.Rule_Severity" json:"severity,omitempty"` + // A list of rule reports. + RuleReports []*RuleReport `protobuf:"bytes,2,rep,name=rule_reports,json=ruleReports,proto3" json:"rule_reports,omitempty"` +} + +func (x *RuleReportGroup) Reset() { + *x = RuleReportGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuleReportGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuleReportGroup) ProtoMessage() {} + +func (x *RuleReportGroup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuleReportGroup.ProtoReflect.Descriptor instead. +func (*RuleReportGroup) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP(), []int{4} +} + +func (x *RuleReportGroup) GetSeverity() Rule_Severity { + if x != nil { + return x.Severity + } + return Rule_SEVERITY_UNSPECIFIED +} + +func (x *RuleReportGroup) GetRuleReports() []*RuleReport { + if x != nil { + return x.RuleReports + } + return nil +} + +var File_google_cloud_apigeeregistry_v1_style_conformance_report_proto protoreflect.FileDescriptor + +var file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, + 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x6c, 0x69, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x5f, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xd5, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x23, + 0x0a, 0x0a, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x67, 0x75, + 0x69, 0x64, 0x65, 0x12, 0x72, 0x0a, 0x17, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x47, 0x75, 0x69, 0x64, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x15, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x47, 0x75, 0x69, 0x64, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x67, + 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x63, 0x0a, 0x12, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x10, 0x72, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, + 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x17, + 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x14, 0x47, 0x75, 0x69, 0x64, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x50, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x67, 0x0a, 0x11, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, + 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x67, 0x75, 0x69, 0x64, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x0f, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x54, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x65, 0x76, + 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x58, 0x0a, 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, + 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x42, + 0x68, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x16, 0x43, 0x6f, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescOnce sync.Once + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescData = file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDesc +) + +func file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescGZIP() []byte { + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescOnce.Do(func() { + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescData) + }) + return file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDescData +} + +var file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_goTypes = []interface{}{ + (*ConformanceReport)(nil), // 0: google.cloud.apigeeregistry.v1.style.ConformanceReport + (*GuidelineReport)(nil), // 1: google.cloud.apigeeregistry.v1.style.GuidelineReport + (*RuleReport)(nil), // 2: google.cloud.apigeeregistry.v1.style.RuleReport + (*GuidelineReportGroup)(nil), // 3: google.cloud.apigeeregistry.v1.style.GuidelineReportGroup + (*RuleReportGroup)(nil), // 4: google.cloud.apigeeregistry.v1.style.RuleReportGroup + (*LintLocation)(nil), // 5: google.cloud.apigeeregistry.v1.style.LintLocation + (Guideline_State)(0), // 6: google.cloud.apigeeregistry.v1.style.Guideline.State + (Rule_Severity)(0), // 7: google.cloud.apigeeregistry.v1.style.Rule.Severity +} +var file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_depIdxs = []int32{ + 3, // 0: google.cloud.apigeeregistry.v1.style.ConformanceReport.guideline_report_groups:type_name -> google.cloud.apigeeregistry.v1.style.GuidelineReportGroup + 4, // 1: google.cloud.apigeeregistry.v1.style.GuidelineReport.rule_report_groups:type_name -> google.cloud.apigeeregistry.v1.style.RuleReportGroup + 5, // 2: google.cloud.apigeeregistry.v1.style.RuleReport.location:type_name -> google.cloud.apigeeregistry.v1.style.LintLocation + 6, // 3: google.cloud.apigeeregistry.v1.style.GuidelineReportGroup.state:type_name -> google.cloud.apigeeregistry.v1.style.Guideline.State + 1, // 4: google.cloud.apigeeregistry.v1.style.GuidelineReportGroup.guideline_reports:type_name -> google.cloud.apigeeregistry.v1.style.GuidelineReport + 7, // 5: google.cloud.apigeeregistry.v1.style.RuleReportGroup.severity:type_name -> google.cloud.apigeeregistry.v1.style.Rule.Severity + 2, // 6: google.cloud.apigeeregistry.v1.style.RuleReportGroup.rule_reports:type_name -> google.cloud.apigeeregistry.v1.style.RuleReport + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_init() } +func file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_init() { + if File_google_cloud_apigeeregistry_v1_style_conformance_report_proto != nil { + return + } + file_google_cloud_apigeeregistry_v1_style_lint_proto_init() + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConformanceReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuidelineReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuleReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuidelineReportGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuleReportGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_goTypes, + DependencyIndexes: file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_depIdxs, + MessageInfos: file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_msgTypes, + }.Build() + File_google_cloud_apigeeregistry_v1_style_conformance_report_proto = out.File + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_rawDesc = nil + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_goTypes = nil + file_google_cloud_apigeeregistry_v1_style_conformance_report_proto_depIdxs = nil +} diff --git a/rpc/registry_lint.pb.go b/rpc/lint.pb.go similarity index 51% rename from rpc/registry_lint.pb.go rename to rpc/lint.pb.go index 1fae2b7f8..02e42a6f1 100644 --- a/rpc/registry_lint.pb.go +++ b/rpc/lint.pb.go @@ -1,26 +1,16 @@ -// Copyright 2020 Google LLC. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.20.1 -// source: google/cloud/apigeeregistry/applications/v1alpha1/registry_lint.proto +// source: google/cloud/apigeeregistry/v1/style/lint.proto + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) package rpc import ( + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -51,7 +41,7 @@ type Lint struct { func (x *Lint) Reset() { *x = Lint{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[0] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -64,7 +54,7 @@ func (x *Lint) String() string { func (*Lint) ProtoMessage() {} func (x *Lint) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[0] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77,7 +67,7 @@ func (x *Lint) ProtoReflect() protoreflect.Message { // Deprecated: Use Lint.ProtoReflect.Descriptor instead. func (*Lint) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{0} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{0} } func (x *Lint) GetName() string { @@ -111,7 +101,7 @@ type LintFile struct { func (x *LintFile) Reset() { *x = LintFile{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[1] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -124,7 +114,7 @@ func (x *LintFile) String() string { func (*LintFile) ProtoMessage() {} func (x *LintFile) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[1] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -137,7 +127,7 @@ func (x *LintFile) ProtoReflect() protoreflect.Message { // Deprecated: Use LintFile.ProtoReflect.Descriptor instead. func (*LintFile) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{1} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{1} } func (x *LintFile) GetFilePath() string { @@ -177,7 +167,7 @@ type LintProblem struct { func (x *LintProblem) Reset() { *x = LintProblem{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[2] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -190,7 +180,7 @@ func (x *LintProblem) String() string { func (*LintProblem) ProtoMessage() {} func (x *LintProblem) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[2] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -203,7 +193,7 @@ func (x *LintProblem) ProtoReflect() protoreflect.Message { // Deprecated: Use LintProblem.ProtoReflect.Descriptor instead. func (*LintProblem) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{2} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{2} } func (x *LintProblem) GetMessage() string { @@ -258,7 +248,7 @@ type LintLocation struct { func (x *LintLocation) Reset() { *x = LintLocation{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[3] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -271,7 +261,7 @@ func (x *LintLocation) String() string { func (*LintLocation) ProtoMessage() {} func (x *LintLocation) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[3] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -284,7 +274,7 @@ func (x *LintLocation) ProtoReflect() protoreflect.Message { // Deprecated: Use LintLocation.ProtoReflect.Descriptor instead. func (*LintLocation) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{3} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{3} } func (x *LintLocation) GetStartPosition() *LintPosition { @@ -318,7 +308,7 @@ type LintPosition struct { func (x *LintPosition) Reset() { *x = LintPosition{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[4] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -331,7 +321,7 @@ func (x *LintPosition) String() string { func (*LintPosition) ProtoMessage() {} func (x *LintPosition) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[4] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -344,7 +334,7 @@ func (x *LintPosition) ProtoReflect() protoreflect.Message { // Deprecated: Use LintPosition.ProtoReflect.Descriptor instead. func (*LintPosition) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{4} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{4} } func (x *LintPosition) GetLineNumber() int32 { @@ -380,7 +370,7 @@ type LintStats struct { func (x *LintStats) Reset() { *x = LintStats{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[5] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -393,7 +383,7 @@ func (x *LintStats) String() string { func (*LintStats) ProtoMessage() {} func (x *LintStats) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[5] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -406,7 +396,7 @@ func (x *LintStats) ProtoReflect() protoreflect.Message { // Deprecated: Use LintStats.ProtoReflect.Descriptor instead. func (*LintStats) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{5} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{5} } func (x *LintStats) GetOperationCount() int32 { @@ -430,7 +420,8 @@ func (x *LintStats) GetProblemCounts() []*LintProblemCount { return nil } -// LintProblemCount represents the number of times a problem was found in linting. +// LintProblemCount represents the number of times a problem was found in +// linting. // (-- api-linter: core::0123::resource-annotation=disabled // aip.dev/not-precedent: This message is not currently used in an API. --) type LintProblemCount struct { @@ -449,7 +440,7 @@ type LintProblemCount struct { func (x *LintProblemCount) Reset() { *x = LintProblemCount{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[6] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -462,7 +453,7 @@ func (x *LintProblemCount) String() string { func (*LintProblemCount) ProtoMessage() {} func (x *LintProblemCount) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[6] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -475,7 +466,7 @@ func (x *LintProblemCount) ProtoReflect() protoreflect.Message { // Deprecated: Use LintProblemCount.ProtoReflect.Descriptor instead. func (*LintProblemCount) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{6} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{6} } func (x *LintProblemCount) GetCount() int32 { @@ -519,7 +510,7 @@ type LinterRequest struct { func (x *LinterRequest) Reset() { *x = LinterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[7] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -532,7 +523,7 @@ func (x *LinterRequest) String() string { func (*LinterRequest) ProtoMessage() {} func (x *LinterRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[7] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -545,7 +536,7 @@ func (x *LinterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LinterRequest.ProtoReflect.Descriptor instead. func (*LinterRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{7} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{7} } func (x *LinterRequest) GetSpecDirectory() string { @@ -562,8 +553,8 @@ func (x *LinterRequest) GetRuleIds() []string { return nil } -// LinterResponse represents a response returned from a linter plugin. It contains a -// list of problems that were identified by the linter. +// LinterResponse represents a response returned from a linter plugin. It +// contains a list of problems that were identified by the linter. // (-- api-linter: core::0123::resource-annotation=disabled // aip.dev/not-precedent: This message is not currently used in an API. --) type LinterResponse struct { @@ -576,9 +567,9 @@ type LinterResponse struct { // an error in this way. // // This should be used to indicate errors which prevent - // the plugin from operating as intended. Errors which indicate a problem in the - // linter itself should be reported by writing a message to stderr and exiting - // with a non-zero status code. + // the plugin from operating as intended. Errors which indicate a problem in + // the linter itself should be reported by writing a message to stderr and + // exiting with a non-zero status code. Errors []string `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` // The problems found when the file was linted. Lint *Lint `protobuf:"bytes,2,opt,name=lint,proto3" json:"lint,omitempty"` @@ -587,7 +578,7 @@ type LinterResponse struct { func (x *LinterResponse) Reset() { *x = LinterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[8] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -600,7 +591,7 @@ func (x *LinterResponse) String() string { func (*LinterResponse) ProtoMessage() {} func (x *LinterResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[8] + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -613,7 +604,7 @@ func (x *LinterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use LinterResponse.ProtoReflect.Descriptor instead. func (*LinterResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP(), []int{8} + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{8} } func (x *LinterResponse) GetErrors() []string { @@ -630,139 +621,196 @@ func (x *LinterResponse) GetLint() *Lint { return nil } -var File_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto protoreflect.FileDescriptor - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDesc = []byte{ - 0x0a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x6d, 0x0a, 0x04, 0x4c, 0x69, - 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x4c, 0x69, +// Linter contains the name and source code / documentation of specific linter. +// (-- api-linter: core::0123::resource-annotation=disabled +// aip.dev/not-precedent: This message is not currently used in an API. --) +type Linter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the linter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A uri to the linter source code or documentation. + Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` +} + +func (x *Linter) Reset() { + *x = Linter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Linter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Linter) ProtoMessage() {} + +func (x *Linter) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Linter.ProtoReflect.Descriptor instead. +func (*Linter) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP(), []int{9} +} + +func (x *Linter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Linter) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +var File_google_cloud_apigeeregistry_v1_style_lint_proto protoreflect.FileDescriptor + +var file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x5a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x22, - 0xdf, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x75, - 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x44, 0x6f, - 0x63, 0x55, 0x72, 0x69, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0c, 0x65, 0x6e, - 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, - 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, - 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x22, 0xc3, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x6a, - 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x70, 0x72, 0x6f, - 0x62, 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x10, 0x4c, 0x69, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, - 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x55, 0x72, 0x69, 0x22, - 0x51, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x49, - 0x64, 0x73, 0x22, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x04, - 0x6c, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, + 0x6d, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x6c, + 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x6f, + 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6c, + 0x65, 0x44, 0x6f, 0x63, 0x55, 0x72, 0x69, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x74, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, + 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0c, 0x4c, 0x69, + 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, + 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, + 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, + 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x10, 0x4c, 0x69, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, + 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x55, 0x72, 0x69, 0x22, 0x51, + 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, + 0x73, 0x22, 0x68, 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x04, 0x6c, + 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x06, 0x4c, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, + 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x03, 0x75, 0x72, 0x69, 0x42, 0x5b, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x74, 0x42, 0x70, 0x0a, 0x35, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x42, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x4c, 0x69, 0x6e, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x42, 0x09, 0x4c, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, + 0x65, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3b, 0x72, + 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescOnce sync.Once - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescData = file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDesc + file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescOnce sync.Once + file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescData = file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDesc ) -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescGZIP() []byte { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescOnce.Do(func() { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescData) +func file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescGZIP() []byte { + file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescOnce.Do(func() { + file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescData) }) - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDescData -} - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_goTypes = []interface{}{ - (*Lint)(nil), // 0: google.cloud.apigeeregistry.applications.v1alpha1.Lint - (*LintFile)(nil), // 1: google.cloud.apigeeregistry.applications.v1alpha1.LintFile - (*LintProblem)(nil), // 2: google.cloud.apigeeregistry.applications.v1alpha1.LintProblem - (*LintLocation)(nil), // 3: google.cloud.apigeeregistry.applications.v1alpha1.LintLocation - (*LintPosition)(nil), // 4: google.cloud.apigeeregistry.applications.v1alpha1.LintPosition - (*LintStats)(nil), // 5: google.cloud.apigeeregistry.applications.v1alpha1.LintStats - (*LintProblemCount)(nil), // 6: google.cloud.apigeeregistry.applications.v1alpha1.LintProblemCount - (*LinterRequest)(nil), // 7: google.cloud.apigeeregistry.applications.v1alpha1.LinterRequest - (*LinterResponse)(nil), // 8: google.cloud.apigeeregistry.applications.v1alpha1.LinterResponse -} -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_depIdxs = []int32{ - 1, // 0: google.cloud.apigeeregistry.applications.v1alpha1.Lint.files:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintFile - 2, // 1: google.cloud.apigeeregistry.applications.v1alpha1.LintFile.problems:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintProblem - 3, // 2: google.cloud.apigeeregistry.applications.v1alpha1.LintProblem.location:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintLocation - 4, // 3: google.cloud.apigeeregistry.applications.v1alpha1.LintLocation.start_position:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintPosition - 4, // 4: google.cloud.apigeeregistry.applications.v1alpha1.LintLocation.end_position:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintPosition - 6, // 5: google.cloud.apigeeregistry.applications.v1alpha1.LintStats.problem_counts:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintProblemCount - 0, // 6: google.cloud.apigeeregistry.applications.v1alpha1.LinterResponse.lint:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Lint + return file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDescData +} + +var file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_google_cloud_apigeeregistry_v1_style_lint_proto_goTypes = []interface{}{ + (*Lint)(nil), // 0: google.cloud.apigeeregistry.v1.style.Lint + (*LintFile)(nil), // 1: google.cloud.apigeeregistry.v1.style.LintFile + (*LintProblem)(nil), // 2: google.cloud.apigeeregistry.v1.style.LintProblem + (*LintLocation)(nil), // 3: google.cloud.apigeeregistry.v1.style.LintLocation + (*LintPosition)(nil), // 4: google.cloud.apigeeregistry.v1.style.LintPosition + (*LintStats)(nil), // 5: google.cloud.apigeeregistry.v1.style.LintStats + (*LintProblemCount)(nil), // 6: google.cloud.apigeeregistry.v1.style.LintProblemCount + (*LinterRequest)(nil), // 7: google.cloud.apigeeregistry.v1.style.LinterRequest + (*LinterResponse)(nil), // 8: google.cloud.apigeeregistry.v1.style.LinterResponse + (*Linter)(nil), // 9: google.cloud.apigeeregistry.v1.style.Linter +} +var file_google_cloud_apigeeregistry_v1_style_lint_proto_depIdxs = []int32{ + 1, // 0: google.cloud.apigeeregistry.v1.style.Lint.files:type_name -> google.cloud.apigeeregistry.v1.style.LintFile + 2, // 1: google.cloud.apigeeregistry.v1.style.LintFile.problems:type_name -> google.cloud.apigeeregistry.v1.style.LintProblem + 3, // 2: google.cloud.apigeeregistry.v1.style.LintProblem.location:type_name -> google.cloud.apigeeregistry.v1.style.LintLocation + 4, // 3: google.cloud.apigeeregistry.v1.style.LintLocation.start_position:type_name -> google.cloud.apigeeregistry.v1.style.LintPosition + 4, // 4: google.cloud.apigeeregistry.v1.style.LintLocation.end_position:type_name -> google.cloud.apigeeregistry.v1.style.LintPosition + 6, // 5: google.cloud.apigeeregistry.v1.style.LintStats.problem_counts:type_name -> google.cloud.apigeeregistry.v1.style.LintProblemCount + 0, // 6: google.cloud.apigeeregistry.v1.style.LinterResponse.lint:type_name -> google.cloud.apigeeregistry.v1.style.Lint 7, // [7:7] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name @@ -770,13 +818,13 @@ var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_d 0, // [0:7] is the sub-list for field type_name } -func init() { file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_init() } -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_init() { - if File_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto != nil { +func init() { file_google_cloud_apigeeregistry_v1_style_lint_proto_init() } +func file_google_cloud_apigeeregistry_v1_style_lint_proto_init() { + if File_google_cloud_apigeeregistry_v1_style_lint_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Lint); i { case 0: return &v.state @@ -788,7 +836,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintFile); i { case 0: return &v.state @@ -800,7 +848,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintProblem); i { case 0: return &v.state @@ -812,7 +860,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintLocation); i { case 0: return &v.state @@ -824,7 +872,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintPosition); i { case 0: return &v.state @@ -836,7 +884,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintStats); i { case 0: return &v.state @@ -848,7 +896,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LintProblemCount); i { case 0: return &v.state @@ -860,7 +908,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LinterRequest); i { case 0: return &v.state @@ -872,7 +920,7 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LinterResponse); i { case 0: return &v.state @@ -884,23 +932,35 @@ func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_ return nil } } + file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Linter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDesc, + RawDescriptor: file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_goTypes, - DependencyIndexes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_depIdxs, - MessageInfos: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_msgTypes, + GoTypes: file_google_cloud_apigeeregistry_v1_style_lint_proto_goTypes, + DependencyIndexes: file_google_cloud_apigeeregistry_v1_style_lint_proto_depIdxs, + MessageInfos: file_google_cloud_apigeeregistry_v1_style_lint_proto_msgTypes, }.Build() - File_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto = out.File - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_rawDesc = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_goTypes = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_depIdxs = nil + File_google_cloud_apigeeregistry_v1_style_lint_proto = out.File + file_google_cloud_apigeeregistry_v1_style_lint_proto_rawDesc = nil + file_google_cloud_apigeeregistry_v1_style_lint_proto_goTypes = nil + file_google_cloud_apigeeregistry_v1_style_lint_proto_depIdxs = nil } diff --git a/rpc/registry_conformance_report.pb.go b/rpc/registry_conformance_report.pb.go deleted file mode 100644 index 5aa9b25e9..000000000 --- a/rpc/registry_conformance_report.pb.go +++ /dev/null @@ -1,600 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.20.1 -// source: google/cloud/apigeeregistry/applications/v1alpha1/registry_conformance_report.proto - -package rpc - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ConformanceReport describes how well an API Spec or a series of -// API Specs conform to a specific API Style guide. -type ConformanceReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Resource name of the conformance report. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Name of the style guide that this report pertains to. - StyleguideName string `protobuf:"bytes,2,opt,name=styleguide_name,json=styleguideName,proto3" json:"styleguide_name,omitempty"` - // A list of guideline report groups. - GuidelineReportGroups []*GuidelineReportGroup `protobuf:"bytes,3,rep,name=guideline_report_groups,json=guidelineReportGroups,proto3" json:"guideline_report_groups,omitempty"` -} - -func (x *ConformanceReport) Reset() { - *x = ConformanceReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConformanceReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConformanceReport) ProtoMessage() {} - -func (x *ConformanceReport) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConformanceReport.ProtoReflect.Descriptor instead. -func (*ConformanceReport) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP(), []int{0} -} - -func (x *ConformanceReport) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ConformanceReport) GetStyleguideName() string { - if x != nil { - return x.StyleguideName - } - return "" -} - -func (x *ConformanceReport) GetGuidelineReportGroups() []*GuidelineReportGroup { - if x != nil { - return x.GuidelineReportGroups - } - return nil -} - -// GuidelineReport describes how well an API Spec or a series of -// API Specs conform to a guideline within an API Style Guide. -type GuidelineReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the guideline that this report pertains to. - GuidelineId string `protobuf:"bytes,1,opt,name=guideline_id,json=guidelineId,proto3" json:"guideline_id,omitempty"` - // A list of rule report groups. - RuleReportGroups []*RuleReportGroup `protobuf:"bytes,2,rep,name=rule_report_groups,json=ruleReportGroups,proto3" json:"rule_report_groups,omitempty"` -} - -func (x *GuidelineReport) Reset() { - *x = GuidelineReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GuidelineReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GuidelineReport) ProtoMessage() {} - -func (x *GuidelineReport) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GuidelineReport.ProtoReflect.Descriptor instead. -func (*GuidelineReport) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP(), []int{1} -} - -func (x *GuidelineReport) GetGuidelineId() string { - if x != nil { - return x.GuidelineId - } - return "" -} - -func (x *GuidelineReport) GetRuleReportGroups() []*RuleReportGroup { - if x != nil { - return x.RuleReportGroups - } - return nil -} - -// RuleReport provides information and feedback on a rule that -// a spec breaches within a guideline on an API Style Guide. -type RuleReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the rule that the spec breaches. - RuleId string `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"` - // Resource name of the spec that the rule was breached on. - SpecName string `protobuf:"bytes,2,opt,name=spec_name,json=specName,proto3" json:"spec_name,omitempty"` - // File name of the spec that the rule was breached on. - FileName string `protobuf:"bytes,3,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` - // A suggestion for resolving the problem. - Suggestion string `protobuf:"bytes,4,opt,name=suggestion,proto3" json:"suggestion,omitempty"` - // The location of the problem in the spec file. - Location *LintLocation `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` -} - -func (x *RuleReport) Reset() { - *x = RuleReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuleReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuleReport) ProtoMessage() {} - -func (x *RuleReport) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuleReport.ProtoReflect.Descriptor instead. -func (*RuleReport) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP(), []int{2} -} - -func (x *RuleReport) GetRuleId() string { - if x != nil { - return x.RuleId - } - return "" -} - -func (x *RuleReport) GetSpecName() string { - if x != nil { - return x.SpecName - } - return "" -} - -func (x *RuleReport) GetFileName() string { - if x != nil { - return x.FileName - } - return "" -} - -func (x *RuleReport) GetSuggestion() string { - if x != nil { - return x.Suggestion - } - return "" -} - -func (x *RuleReport) GetLocation() *LintLocation { - if x != nil { - return x.Location - } - return nil -} - -// GuidelineReportGroup is an abstraction that maps status -// (PROPOSED, ACTIVE, DEPRECATED, DISABLED) to a list of -// guideline reports for guidelines of that status. -type GuidelineReportGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status of the guidelines in this report group. - Status Guideline_Status `protobuf:"varint,1,opt,name=status,proto3,enum=google.cloud.apigeeregistry.applications.v1alpha1.Guideline_Status" json:"status,omitempty"` - // A list of guideline reports. - GuidelineReports []*GuidelineReport `protobuf:"bytes,2,rep,name=guideline_reports,json=guidelineReports,proto3" json:"guideline_reports,omitempty"` -} - -func (x *GuidelineReportGroup) Reset() { - *x = GuidelineReportGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GuidelineReportGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GuidelineReportGroup) ProtoMessage() {} - -func (x *GuidelineReportGroup) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GuidelineReportGroup.ProtoReflect.Descriptor instead. -func (*GuidelineReportGroup) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP(), []int{3} -} - -func (x *GuidelineReportGroup) GetStatus() Guideline_Status { - if x != nil { - return x.Status - } - return Guideline_STATUS_UNSPECIFIED -} - -func (x *GuidelineReportGroup) GetGuidelineReports() []*GuidelineReport { - if x != nil { - return x.GuidelineReports - } - return nil -} - -// RuleReportGroup is an abstraction that maps severity -// (ERROR WARNING, INFO, HINT) to a list of rule reports for -// rules of that severity. -type RuleReportGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Severity of the rules in this report group. - Severity Rule_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.applications.v1alpha1.Rule_Severity" json:"severity,omitempty"` - // A list of rule reports. - RuleReports []*RuleReport `protobuf:"bytes,2,rep,name=rule_reports,json=ruleReports,proto3" json:"rule_reports,omitempty"` -} - -func (x *RuleReportGroup) Reset() { - *x = RuleReportGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuleReportGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuleReportGroup) ProtoMessage() {} - -func (x *RuleReportGroup) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuleReportGroup.ProtoReflect.Descriptor instead. -func (*RuleReportGroup) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP(), []int{4} -} - -func (x *RuleReportGroup) GetSeverity() Rule_Severity { - if x != nil { - return x.Severity - } - return Rule_SEVERITY_UNSPECIFIED -} - -func (x *RuleReportGroup) GetRuleReports() []*RuleReport { - if x != nil { - return x.RuleReports - } - return nil -} - -var File_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto protoreflect.FileDescriptor - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDesc = []byte{ - 0x0a, 0x53, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, - 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, - 0x73, 0x74, 0x79, 0x6c, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x74, 0x79, 0x6c, - 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x7f, 0x0a, 0x17, 0x67, 0x75, - 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, - 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0f, - 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x26, 0x0a, 0x0c, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x67, 0x75, 0x69, 0x64, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x70, 0x0a, 0x12, 0x72, 0x75, 0x6c, 0x65, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x10, 0x72, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x0a, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, - 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, - 0x73, 0x70, 0x65, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, - 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x08, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, - 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xee, 0x01, 0x0a, 0x14, 0x47, 0x75, 0x69, 0x64, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x60, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x74, 0x0a, 0x11, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x61, 0x0a, 0x08, - 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x65, 0x0a, 0x0c, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x42, 0x7d, 0x0a, 0x35, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, - 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x67, 0x65, 0x65, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x72, 0x70, - 0x63, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescOnce sync.Once - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescData = file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDesc -) - -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescGZIP() []byte { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescOnce.Do(func() { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescData) - }) - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDescData -} - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_goTypes = []interface{}{ - (*ConformanceReport)(nil), // 0: google.cloud.apigeeregistry.applications.v1alpha1.ConformanceReport - (*GuidelineReport)(nil), // 1: google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReport - (*RuleReport)(nil), // 2: google.cloud.apigeeregistry.applications.v1alpha1.RuleReport - (*GuidelineReportGroup)(nil), // 3: google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReportGroup - (*RuleReportGroup)(nil), // 4: google.cloud.apigeeregistry.applications.v1alpha1.RuleReportGroup - (*LintLocation)(nil), // 5: google.cloud.apigeeregistry.applications.v1alpha1.LintLocation - (Guideline_Status)(0), // 6: google.cloud.apigeeregistry.applications.v1alpha1.Guideline.Status - (Rule_Severity)(0), // 7: google.cloud.apigeeregistry.applications.v1alpha1.Rule.Severity -} -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_depIdxs = []int32{ - 3, // 0: google.cloud.apigeeregistry.applications.v1alpha1.ConformanceReport.guideline_report_groups:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReportGroup - 4, // 1: google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReport.rule_report_groups:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.RuleReportGroup - 5, // 2: google.cloud.apigeeregistry.applications.v1alpha1.RuleReport.location:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.LintLocation - 6, // 3: google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReportGroup.status:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Guideline.Status - 1, // 4: google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReportGroup.guideline_reports:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.GuidelineReport - 7, // 5: google.cloud.apigeeregistry.applications.v1alpha1.RuleReportGroup.severity:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Rule.Severity - 2, // 6: google.cloud.apigeeregistry.applications.v1alpha1.RuleReportGroup.rule_reports:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.RuleReport - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_init() -} -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_init() { - if File_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto != nil { - return - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_init() - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_lint_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConformanceReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuidelineReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuidelineReportGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleReportGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_goTypes, - DependencyIndexes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_depIdxs, - MessageInfos: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_msgTypes, - }.Build() - File_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto = out.File - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_rawDesc = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_goTypes = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_conformance_report_proto_depIdxs = nil -} diff --git a/rpc/registry_styleguide.pb.go b/rpc/registry_styleguide.pb.go deleted file mode 100644 index 829b379e2..000000000 --- a/rpc/registry_styleguide.pb.go +++ /dev/null @@ -1,708 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.20.1 -// source: google/cloud/apigeeregistry/applications/v1alpha1/registry_styleguide.proto - -package rpc - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Possible severities for this guideline. -type Guideline_Status int32 - -const ( - // The default value, unused. - Guideline_STATUS_UNSPECIFIED Guideline_Status = 0 - // The guideline is being proposed, and shouldn't yet - // be enforced. - Guideline_PROPOSED Guideline_Status = 1 - // The guideline is active and should be enforced. - Guideline_ACTIVE Guideline_Status = 2 - // The guideline is deprecated as of the recent version, - // and shouldn't be enforced. - Guideline_DEPRECATED Guideline_Status = 3 - // The guideline has been disabled and shouldn't be enforced. - Guideline_DISABLED Guideline_Status = 4 -) - -// Enum value maps for Guideline_Status. -var ( - Guideline_Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "PROPOSED", - 2: "ACTIVE", - 3: "DEPRECATED", - 4: "DISABLED", - } - Guideline_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "PROPOSED": 1, - "ACTIVE": 2, - "DEPRECATED": 3, - "DISABLED": 4, - } -) - -func (x Guideline_Status) Enum() *Guideline_Status { - p := new(Guideline_Status) - *p = x - return p -} - -func (x Guideline_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Guideline_Status) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes[0].Descriptor() -} - -func (Guideline_Status) Type() protoreflect.EnumType { - return &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes[0] -} - -func (x Guideline_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Guideline_Status.Descriptor instead. -func (Guideline_Status) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{1, 0} -} - -// Possible severities for the violation of a rule. -type Rule_Severity int32 - -const ( - // The default value, unused. - Rule_SEVERITY_UNSPECIFIED Rule_Severity = 0 - // Violation of the rule is an error that must be fixed. - Rule_ERROR Rule_Severity = 1 - // Violation of the rule is a pattern that is wrong, - // and should be warned about. - Rule_WARNING Rule_Severity = 2 - // Violation of the rule is not necessarily a bad pattern - // or error, but information the user should be aware of. - Rule_INFO Rule_Severity = 3 - // Violation of the rule is a hint that is provided to - // the user to fix their spec's design. - Rule_HINT Rule_Severity = 4 -) - -// Enum value maps for Rule_Severity. -var ( - Rule_Severity_name = map[int32]string{ - 0: "SEVERITY_UNSPECIFIED", - 1: "ERROR", - 2: "WARNING", - 3: "INFO", - 4: "HINT", - } - Rule_Severity_value = map[string]int32{ - "SEVERITY_UNSPECIFIED": 0, - "ERROR": 1, - "WARNING": 2, - "INFO": 3, - "HINT": 4, - } -) - -func (x Rule_Severity) Enum() *Rule_Severity { - p := new(Rule_Severity) - *p = x - return p -} - -func (x Rule_Severity) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Rule_Severity) Descriptor() protoreflect.EnumDescriptor { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes[1].Descriptor() -} - -func (Rule_Severity) Type() protoreflect.EnumType { - return &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes[1] -} - -func (x Rule_Severity) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Rule_Severity.Descriptor instead. -func (Rule_Severity) EnumDescriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{2, 0} -} - -// StyleGuide defines a set of guidelines and linters that govern the -// static analysis of API Specs with specified mime types. -type StyleGuide struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier of the style guide. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Human-meaningful name of the style guide. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // This field lists the MIME types of the specs that the style guide applies to. - // It is a list containing style (format) descriptors that are specified - // as a Media Type (https://en.wikipedia.org/wiki/Media_type). - // Possible values include "application/vnd.apigee.proto", - // "application/vnd.apigee.openapi", and "application/vnd.apigee.graphql", - // with possible suffixes representing compression types. These hypothetical - // names are defined in the vendor tree defined in RFC6838 - // (https://tools.ietf.org/html/rfc6838) and are not final. - MimeTypes []string `protobuf:"bytes,3,rep,name=mime_types,json=mimeTypes,proto3" json:"mime_types,omitempty"` - // A list of guidelines that are specified by this style guide. - Guidelines []*Guideline `protobuf:"bytes,4,rep,name=guidelines,proto3" json:"guidelines,omitempty"` - // A list of linters that this style guide uses. - Linters []*Linter `protobuf:"bytes,5,rep,name=linters,proto3" json:"linters,omitempty"` -} - -func (x *StyleGuide) Reset() { - *x = StyleGuide{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StyleGuide) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StyleGuide) ProtoMessage() {} - -func (x *StyleGuide) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StyleGuide.ProtoReflect.Descriptor instead. -func (*StyleGuide) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{0} -} - -func (x *StyleGuide) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *StyleGuide) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *StyleGuide) GetMimeTypes() []string { - if x != nil { - return x.MimeTypes - } - return nil -} - -func (x *StyleGuide) GetGuidelines() []*Guideline { - if x != nil { - return x.Guidelines - } - return nil -} - -func (x *StyleGuide) GetLinters() []*Linter { - if x != nil { - return x.Linters - } - return nil -} - -// Guideline defines a set of rules that achieve a common design -// goal for API specs. -type Guideline struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier of the guideline. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Human-meaningful name of the guideline. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // A detailed description of the guideline. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // A list of rules that this guideline specifies. - Rules []*Rule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` - // Indicates the status of the guideline. - Status Guideline_Status `protobuf:"varint,5,opt,name=status,proto3,enum=google.cloud.apigeeregistry.applications.v1alpha1.Guideline_Status" json:"status,omitempty"` -} - -func (x *Guideline) Reset() { - *x = Guideline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Guideline) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Guideline) ProtoMessage() {} - -func (x *Guideline) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Guideline.ProtoReflect.Descriptor instead. -func (*Guideline) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{1} -} - -func (x *Guideline) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Guideline) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Guideline) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Guideline) GetRules() []*Rule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Guideline) GetStatus() Guideline_Status { - if x != nil { - return x.Status - } - return Guideline_STATUS_UNSPECIFIED -} - -// Rule is a specific design rule that can be applied to an API spec, -// and is enforced by a specified linter. -type Rule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier of the rule. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Human-meaningful name of the rule. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // A detailed description of the rule. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // Name of the linter that enforces this rule. - Linter string `protobuf:"bytes,4,opt,name=linter,proto3" json:"linter,omitempty"` - // Name of the rule on the linter that enforces it. - LinterRulename string `protobuf:"bytes,5,opt,name=linter_rulename,json=linterRulename,proto3" json:"linter_rulename,omitempty"` - // Severity of violating this rule. - Severity Rule_Severity `protobuf:"varint,6,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.applications.v1alpha1.Rule_Severity" json:"severity,omitempty"` - // A link to additional documentation relating to this rule. - DocUri string `protobuf:"bytes,7,opt,name=doc_uri,json=docUri,proto3" json:"doc_uri,omitempty"` -} - -func (x *Rule) Reset() { - *x = Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Rule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rule) ProtoMessage() {} - -func (x *Rule) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rule.ProtoReflect.Descriptor instead. -func (*Rule) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{2} -} - -func (x *Rule) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Rule) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Rule) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Rule) GetLinter() string { - if x != nil { - return x.Linter - } - return "" -} - -func (x *Rule) GetLinterRulename() string { - if x != nil { - return x.LinterRulename - } - return "" -} - -func (x *Rule) GetSeverity() Rule_Severity { - if x != nil { - return x.Severity - } - return Rule_SEVERITY_UNSPECIFIED -} - -func (x *Rule) GetDocUri() string { - if x != nil { - return x.DocUri - } - return "" -} - -// Linter contains the name and source code / documentation of specific -// linter that a style guide uses. -type Linter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the linter. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A uri to the linter source code or documentation. - Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` -} - -func (x *Linter) Reset() { - *x = Linter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Linter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Linter) ProtoMessage() {} - -func (x *Linter) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Linter.ProtoReflect.Descriptor instead. -func (*Linter) Descriptor() ([]byte, []int) { - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP(), []int{3} -} - -func (x *Linter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Linter) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -var File_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto protoreflect.FileDescriptor - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDesc = []byte{ - 0x0a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x79, - 0x6c, 0x65, 0x67, 0x75, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, - 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa0, 0x02, 0x0a, 0x0a, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, - 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0a, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x12, 0x5c, 0x0a, 0x0a, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x53, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x07, 0x6c, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x73, 0x22, 0xf0, 0x02, 0x0a, 0x09, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x5b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x58, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, - 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, - 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x22, 0xf4, 0x02, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x06, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x63, 0x55, 0x72, 0x69, 0x22, 0x50, 0x0a, 0x08, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x56, 0x45, - 0x52, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x4e, 0x54, 0x10, 0x04, 0x22, 0x38, - 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x03, 0x75, 0x72, 0x69, 0x42, 0x76, 0x0a, 0x35, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x74, 0x79, 0x6c, 0x65, - 0x47, 0x75, 0x69, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x2f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x70, 0x63, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescOnce sync.Once - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescData = file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDesc -) - -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescGZIP() []byte { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescOnce.Do(func() { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescData) - }) - return file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDescData -} - -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_goTypes = []interface{}{ - (Guideline_Status)(0), // 0: google.cloud.apigeeregistry.applications.v1alpha1.Guideline.Status - (Rule_Severity)(0), // 1: google.cloud.apigeeregistry.applications.v1alpha1.Rule.Severity - (*StyleGuide)(nil), // 2: google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide - (*Guideline)(nil), // 3: google.cloud.apigeeregistry.applications.v1alpha1.Guideline - (*Rule)(nil), // 4: google.cloud.apigeeregistry.applications.v1alpha1.Rule - (*Linter)(nil), // 5: google.cloud.apigeeregistry.applications.v1alpha1.Linter -} -var file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_depIdxs = []int32{ - 3, // 0: google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide.guidelines:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Guideline - 5, // 1: google.cloud.apigeeregistry.applications.v1alpha1.StyleGuide.linters:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Linter - 4, // 2: google.cloud.apigeeregistry.applications.v1alpha1.Guideline.rules:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Rule - 0, // 3: google.cloud.apigeeregistry.applications.v1alpha1.Guideline.status:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Guideline.Status - 1, // 4: google.cloud.apigeeregistry.applications.v1alpha1.Rule.severity:type_name -> google.cloud.apigeeregistry.applications.v1alpha1.Rule.Severity - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_init() } -func file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_init() { - if File_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StyleGuide); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Guideline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Linter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDesc, - NumEnums: 2, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_goTypes, - DependencyIndexes: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_depIdxs, - EnumInfos: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_enumTypes, - MessageInfos: file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_msgTypes, - }.Build() - File_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto = out.File - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_rawDesc = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_goTypes = nil - file_google_cloud_apigeeregistry_applications_v1alpha1_registry_styleguide_proto_depIdxs = nil -} diff --git a/rpc/style_guide.pb.go b/rpc/style_guide.pb.go new file mode 100644 index 000000000..d4358f273 --- /dev/null +++ b/rpc/style_guide.pb.go @@ -0,0 +1,630 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.1 +// source: google/cloud/apigeeregistry/v1/style/style_guide.proto + +// (-- api-linter: core::0215::versioned-packages=disabled +// aip.dev/not-precedent: Support protos for the apigeeregistry.v1 API. --) + +package rpc + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Possible states for this guideline. +type Guideline_State int32 + +const ( + // The default value, unused. + Guideline_STATE_UNSPECIFIED Guideline_State = 0 + // The guideline is being proposed, and shouldn't yet + // be enforced. + Guideline_PROPOSED Guideline_State = 1 + // The guideline is active and should be enforced. + Guideline_ACTIVE Guideline_State = 2 + // The guideline is deprecated as of the recent version, + // and shouldn't be enforced. + Guideline_DEPRECATED Guideline_State = 3 + // The guideline has been disabled and shouldn't be enforced. + Guideline_DISABLED Guideline_State = 4 +) + +// Enum value maps for Guideline_State. +var ( + Guideline_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PROPOSED", + 2: "ACTIVE", + 3: "DEPRECATED", + 4: "DISABLED", + } + Guideline_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PROPOSED": 1, + "ACTIVE": 2, + "DEPRECATED": 3, + "DISABLED": 4, + } +) + +func (x Guideline_State) Enum() *Guideline_State { + p := new(Guideline_State) + *p = x + return p +} + +func (x Guideline_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Guideline_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes[0].Descriptor() +} + +func (Guideline_State) Type() protoreflect.EnumType { + return &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes[0] +} + +func (x Guideline_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Guideline_State.Descriptor instead. +func (Guideline_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP(), []int{1, 0} +} + +// Possible severities for the violation of a rule. +type Rule_Severity int32 + +const ( + // The default value, unused. + Rule_SEVERITY_UNSPECIFIED Rule_Severity = 0 + // Violation of the rule is an error that must be fixed. + Rule_ERROR Rule_Severity = 1 + // Violation of the rule is a pattern that is wrong, + // and should be warned about. + Rule_WARNING Rule_Severity = 2 + // Violation of the rule is not necessarily a bad pattern + // or error, but information the user should be aware of. + Rule_INFO Rule_Severity = 3 + // Violation of the rule is a hint that is provided to + // the user to fix their spec's design. + Rule_HINT Rule_Severity = 4 +) + +// Enum value maps for Rule_Severity. +var ( + Rule_Severity_name = map[int32]string{ + 0: "SEVERITY_UNSPECIFIED", + 1: "ERROR", + 2: "WARNING", + 3: "INFO", + 4: "HINT", + } + Rule_Severity_value = map[string]int32{ + "SEVERITY_UNSPECIFIED": 0, + "ERROR": 1, + "WARNING": 2, + "INFO": 3, + "HINT": 4, + } +) + +func (x Rule_Severity) Enum() *Rule_Severity { + p := new(Rule_Severity) + *p = x + return p +} + +func (x Rule_Severity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Rule_Severity) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes[1].Descriptor() +} + +func (Rule_Severity) Type() protoreflect.EnumType { + return &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes[1] +} + +func (x Rule_Severity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Rule_Severity.Descriptor instead. +func (Rule_Severity) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP(), []int{2, 0} +} + +// StyleGuide defines a set of guidelines and linters that govern the +// static analysis of API Specs with specified mime types. +type StyleGuide struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of the style guide. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Artifact kind. May be used in YAML representations to identify the type of + // this artifact. + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + // Human-meaningful name of the style guide. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // This field lists the MIME types of the specs that the style guide applies + // to. It is a list containing style (format) descriptors that are specified + // as a Media Type (https://en.wikipedia.org/wiki/Media_type). + // Possible values include "application/vnd.apigee.proto", + // "application/vnd.apigee.openapi", and "application/vnd.apigee.graphql", + // with possible suffixes representing compression types. These hypothetical + // names are defined in the vendor tree defined in RFC6838 + // (https://tools.ietf.org/html/rfc6838) and are not final. + MimeTypes []string `protobuf:"bytes,4,rep,name=mime_types,json=mimeTypes,proto3" json:"mime_types,omitempty"` + // A list of guidelines that are specified by this style guide. + Guidelines []*Guideline `protobuf:"bytes,5,rep,name=guidelines,proto3" json:"guidelines,omitempty"` + // A list of linters that this style guide uses. + Linters []*Linter `protobuf:"bytes,6,rep,name=linters,proto3" json:"linters,omitempty"` +} + +func (x *StyleGuide) Reset() { + *x = StyleGuide{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StyleGuide) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StyleGuide) ProtoMessage() {} + +func (x *StyleGuide) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StyleGuide.ProtoReflect.Descriptor instead. +func (*StyleGuide) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP(), []int{0} +} + +func (x *StyleGuide) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *StyleGuide) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *StyleGuide) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *StyleGuide) GetMimeTypes() []string { + if x != nil { + return x.MimeTypes + } + return nil +} + +func (x *StyleGuide) GetGuidelines() []*Guideline { + if x != nil { + return x.Guidelines + } + return nil +} + +func (x *StyleGuide) GetLinters() []*Linter { + if x != nil { + return x.Linters + } + return nil +} + +// Guideline defines a set of rules that achieve a common design +// goal for API specs. +type Guideline struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of the guideline. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Human-meaningful name of the guideline. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // A detailed description of the guideline. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // A list of rules that this guideline specifies. + Rules []*Rule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` + // Indicates the state of the guideline. + State Guideline_State `protobuf:"varint,5,opt,name=state,proto3,enum=google.cloud.apigeeregistry.v1.style.Guideline_State" json:"state,omitempty"` +} + +func (x *Guideline) Reset() { + *x = Guideline{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Guideline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Guideline) ProtoMessage() {} + +func (x *Guideline) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Guideline.ProtoReflect.Descriptor instead. +func (*Guideline) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP(), []int{1} +} + +func (x *Guideline) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Guideline) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Guideline) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Guideline) GetRules() []*Rule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *Guideline) GetState() Guideline_State { + if x != nil { + return x.State + } + return Guideline_STATE_UNSPECIFIED +} + +// Rule is a specific design rule that can be applied to an API spec, +// and is enforced by a specified linter. +type Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of the rule. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Human-meaningful name of the rule. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // A detailed description of the rule. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Name of the linter that enforces this rule. + Linter string `protobuf:"bytes,4,opt,name=linter,proto3" json:"linter,omitempty"` + // Name of the rule on the linter that enforces it. + LinterRulename string `protobuf:"bytes,5,opt,name=linter_rulename,json=linterRulename,proto3" json:"linter_rulename,omitempty"` + // Severity of violating this rule. + Severity Rule_Severity `protobuf:"varint,6,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.v1.style.Rule_Severity" json:"severity,omitempty"` + // A link to additional documentation relating to this rule. + DocUri string `protobuf:"bytes,7,opt,name=doc_uri,json=docUri,proto3" json:"doc_uri,omitempty"` +} + +func (x *Rule) Reset() { + *x = Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rule) ProtoMessage() {} + +func (x *Rule) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rule.ProtoReflect.Descriptor instead. +func (*Rule) Descriptor() ([]byte, []int) { + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP(), []int{2} +} + +func (x *Rule) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Rule) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Rule) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Rule) GetLinter() string { + if x != nil { + return x.Linter + } + return "" +} + +func (x *Rule) GetLinterRulename() string { + if x != nil { + return x.LinterRulename + } + return "" +} + +func (x *Rule) GetSeverity() Rule_Severity { + if x != nil { + return x.Severity + } + return Rule_SEVERITY_UNSPECIFIED +} + +func (x *Rule) GetDocUri() string { + if x != nil { + return x.DocUri + } + return "" +} + +var File_google_cloud_apigeeregistry_v1_style_style_guide_proto protoreflect.FileDescriptor + +var file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x67, 0x75, 0x69, + 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, + 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2f, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x9a, 0x02, 0x0a, 0x0a, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x47, 0x75, 0x69, 0x64, 0x65, 0x12, + 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0a, 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, + 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x0a, 0x67, 0x75, 0x69, 0x64, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x22, 0xd1, 0x02, + 0x0a, 0x09, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, + 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x2e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x56, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x04, 0x22, 0xe7, 0x02, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x2c, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0e, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x4f, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x17, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x6f, 0x63, 0x55, 0x72, 0x69, 0x22, 0x50, 0x0a, 0x08, 0x53, 0x65, 0x76, + 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, + 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, + 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x4e, 0x54, 0x10, 0x04, 0x42, 0x61, 0x0a, 0x28, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x0f, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x47, 0x75, + 0x69, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x67, 0x65, 0x65, 0x2f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescOnce sync.Once + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescData = file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDesc +) + +func file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescGZIP() []byte { + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescOnce.Do(func() { + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescData) + }) + return file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDescData +} + +var file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_apigeeregistry_v1_style_style_guide_proto_goTypes = []interface{}{ + (Guideline_State)(0), // 0: google.cloud.apigeeregistry.v1.style.Guideline.State + (Rule_Severity)(0), // 1: google.cloud.apigeeregistry.v1.style.Rule.Severity + (*StyleGuide)(nil), // 2: google.cloud.apigeeregistry.v1.style.StyleGuide + (*Guideline)(nil), // 3: google.cloud.apigeeregistry.v1.style.Guideline + (*Rule)(nil), // 4: google.cloud.apigeeregistry.v1.style.Rule + (*Linter)(nil), // 5: google.cloud.apigeeregistry.v1.style.Linter +} +var file_google_cloud_apigeeregistry_v1_style_style_guide_proto_depIdxs = []int32{ + 3, // 0: google.cloud.apigeeregistry.v1.style.StyleGuide.guidelines:type_name -> google.cloud.apigeeregistry.v1.style.Guideline + 5, // 1: google.cloud.apigeeregistry.v1.style.StyleGuide.linters:type_name -> google.cloud.apigeeregistry.v1.style.Linter + 4, // 2: google.cloud.apigeeregistry.v1.style.Guideline.rules:type_name -> google.cloud.apigeeregistry.v1.style.Rule + 0, // 3: google.cloud.apigeeregistry.v1.style.Guideline.state:type_name -> google.cloud.apigeeregistry.v1.style.Guideline.State + 1, // 4: google.cloud.apigeeregistry.v1.style.Rule.severity:type_name -> google.cloud.apigeeregistry.v1.style.Rule.Severity + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_apigeeregistry_v1_style_style_guide_proto_init() } +func file_google_cloud_apigeeregistry_v1_style_style_guide_proto_init() { + if File_google_cloud_apigeeregistry_v1_style_style_guide_proto != nil { + return + } + file_google_cloud_apigeeregistry_v1_style_lint_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StyleGuide); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Guideline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_apigeeregistry_v1_style_style_guide_proto_goTypes, + DependencyIndexes: file_google_cloud_apigeeregistry_v1_style_style_guide_proto_depIdxs, + EnumInfos: file_google_cloud_apigeeregistry_v1_style_style_guide_proto_enumTypes, + MessageInfos: file_google_cloud_apigeeregistry_v1_style_style_guide_proto_msgTypes, + }.Build() + File_google_cloud_apigeeregistry_v1_style_style_guide_proto = out.File + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_rawDesc = nil + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_goTypes = nil + file_google_cloud_apigeeregistry_v1_style_style_guide_proto_depIdxs = nil +} diff --git a/tools/PROTOS.sh b/tools/PROTOS.sh index 3a4bfcc0a..45871b2aa 100755 --- a/tools/PROTOS.sh +++ b/tools/PROTOS.sh @@ -22,6 +22,7 @@ ALL_PROTOS=( google/cloud/apigeeregistry/v1/controller/*.proto google/cloud/apigeeregistry/v1/apihub/*.proto google/cloud/apigeeregistry/v1/scoring/*.proto + google/cloud/apigeeregistry/v1/style/*.proto ) SERVICE_PROTOS=(