pax_global_header 0000666 0000000 0000000 00000000064 14225377162 0014523 g ustar 00root root 0000000 0000000 52 comment=577692584cdf09674595bba0c182d0e8a44655d3
gnostic-models-0.6.8/ 0000775 0000000 0000000 00000000000 14225377162 0014465 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/CONTRIBUTING.md 0000664 0000000 0000000 00000002117 14225377162 0016717 0 ustar 00root root 0000000 0000000 # How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement (CLA). You (or your employer) retain the copyright to your
contribution; this simply gives us permission to use and redistribute your
contributions as part of the project. Head over to
to see your current agreements on file or
to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code Reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
## Community Guidelines
This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
gnostic-models-0.6.8/LICENSE 0000664 0000000 0000000 00000026137 14225377162 0015503 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
gnostic-models-0.6.8/README.md 0000664 0000000 0000000 00000001606 14225377162 0015747 0 ustar 00root root 0000000 0000000 # ⨁ gnostic-models
This repository contains Protocol Buffer models and associated libraries
for working with API description formats supported by
[gnostic](https://github.com/google/gnostic). It exists to provide a
lightweight distribution of these models with minimal dependencies.
For more information, please see the
[gnostic](https://github.com/google/gnostic) repository.
## Versions
Versions of this repository will be tagged with the **gnostic** version used
to create them, e.g. "v0.7.0" will correspond to "v0.7.0" of **gnostic**.
## Disclaimer
Feedback and contributions are welcome! Until there is a 1.0 release, please
consider this prerelease software and work in progress. To ensure stable
builds, we request that dependent projects always refer to tagged releases of
**gnostic**.
## Copyright
Copyright 2017-2022, Google LLC.
## License
Released under the Apache 2.0 license.
gnostic-models-0.6.8/compiler/ 0000775 0000000 0000000 00000000000 14225377162 0016277 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/compiler/README.md 0000664 0000000 0000000 00000000157 14225377162 0017561 0 ustar 00root root 0000000 0000000 # Compiler support code
This directory contains compiler support code used by Gnostic and Gnostic
extensions.
gnostic-models-0.6.8/compiler/context.go 0000664 0000000 0000000 00000003335 14225377162 0020316 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package compiler
import (
yaml "gopkg.in/yaml.v3"
)
// Context contains state of the compiler as it traverses a document.
type Context struct {
Parent *Context
Name string
Node *yaml.Node
ExtensionHandlers *[]ExtensionHandler
}
// NewContextWithExtensions returns a new object representing the compiler state
func NewContextWithExtensions(name string, node *yaml.Node, parent *Context, extensionHandlers *[]ExtensionHandler) *Context {
return &Context{Name: name, Node: node, Parent: parent, ExtensionHandlers: extensionHandlers}
}
// NewContext returns a new object representing the compiler state
func NewContext(name string, node *yaml.Node, parent *Context) *Context {
if parent != nil {
return &Context{Name: name, Node: node, Parent: parent, ExtensionHandlers: parent.ExtensionHandlers}
}
return &Context{Name: name, Parent: parent, ExtensionHandlers: nil}
}
// Description returns a text description of the compiler state
func (context *Context) Description() string {
name := context.Name
if context.Parent != nil {
name = context.Parent.Description() + "." + name
}
return name
}
gnostic-models-0.6.8/compiler/error.go 0000664 0000000 0000000 00000003535 14225377162 0017765 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package compiler
import "fmt"
// Error represents compiler errors and their location in the document.
type Error struct {
Context *Context
Message string
}
// NewError creates an Error.
func NewError(context *Context, message string) *Error {
return &Error{Context: context, Message: message}
}
func (err *Error) locationDescription() string {
if err.Context.Node != nil {
return fmt.Sprintf("[%d,%d] %s", err.Context.Node.Line, err.Context.Node.Column, err.Context.Description())
}
return err.Context.Description()
}
// Error returns the string value of an Error.
func (err *Error) Error() string {
if err.Context == nil {
return err.Message
}
return err.locationDescription() + " " + err.Message
}
// ErrorGroup is a container for groups of Error values.
type ErrorGroup struct {
Errors []error
}
// NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty.
func NewErrorGroupOrNil(errors []error) error {
if len(errors) == 0 {
return nil
} else if len(errors) == 1 {
return errors[0]
} else {
return &ErrorGroup{Errors: errors}
}
}
func (group *ErrorGroup) Error() string {
result := ""
for i, err := range group.Errors {
if i > 0 {
result += "\n"
}
result += err.Error()
}
return result
}
gnostic-models-0.6.8/compiler/extensions.go 0000664 0000000 0000000 00000005127 14225377162 0021032 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package compiler
import (
"bytes"
"fmt"
"os/exec"
"strings"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/any"
yaml "gopkg.in/yaml.v3"
extensions "github.com/google/gnostic-models/extensions"
)
// ExtensionHandler describes a binary that is called by the compiler to handle specification extensions.
type ExtensionHandler struct {
Name string
}
// CallExtension calls a binary extension handler.
func CallExtension(context *Context, in *yaml.Node, extensionName string) (handled bool, response *any.Any, err error) {
if context == nil || context.ExtensionHandlers == nil {
return false, nil, nil
}
handled = false
for _, handler := range *(context.ExtensionHandlers) {
response, err = handler.handle(in, extensionName)
if response == nil {
continue
} else {
handled = true
break
}
}
return handled, response, err
}
func (extensionHandlers *ExtensionHandler) handle(in *yaml.Node, extensionName string) (*any.Any, error) {
if extensionHandlers.Name != "" {
yamlData, _ := yaml.Marshal(in)
request := &extensions.ExtensionHandlerRequest{
CompilerVersion: &extensions.Version{
Major: 0,
Minor: 1,
Patch: 0,
},
Wrapper: &extensions.Wrapper{
Version: "unknown", // TODO: set this to the type/version of spec being parsed.
Yaml: string(yamlData),
ExtensionName: extensionName,
},
}
requestBytes, _ := proto.Marshal(request)
cmd := exec.Command(extensionHandlers.Name)
cmd.Stdin = bytes.NewReader(requestBytes)
output, err := cmd.Output()
if err != nil {
return nil, err
}
response := &extensions.ExtensionHandlerResponse{}
err = proto.Unmarshal(output, response)
if err != nil || !response.Handled {
return nil, err
}
if len(response.Errors) != 0 {
return nil, fmt.Errorf("Errors when parsing: %+v for field %s by vendor extension handler %s. Details %+v", in, extensionName, extensionHandlers.Name, strings.Join(response.Errors, ","))
}
return response.Value, nil
}
return nil, nil
}
gnostic-models-0.6.8/compiler/helpers.go 0000664 0000000 0000000 00000022377 14225377162 0020303 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package compiler
import (
"fmt"
"regexp"
"sort"
"strconv"
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/jsonschema"
)
// compiler helper functions, usually called from generated code
// UnpackMap gets a *yaml.Node if possible.
func UnpackMap(in *yaml.Node) (*yaml.Node, bool) {
if in == nil {
return nil, false
}
return in, true
}
// SortedKeysForMap returns the sorted keys of a yamlv2.MapSlice.
func SortedKeysForMap(m *yaml.Node) []string {
keys := make([]string, 0)
if m.Kind == yaml.MappingNode {
for i := 0; i < len(m.Content); i += 2 {
keys = append(keys, m.Content[i].Value)
}
}
sort.Strings(keys)
return keys
}
// MapHasKey returns true if a yamlv2.MapSlice contains a specified key.
func MapHasKey(m *yaml.Node, key string) bool {
if m == nil {
return false
}
if m.Kind == yaml.MappingNode {
for i := 0; i < len(m.Content); i += 2 {
itemKey := m.Content[i].Value
if key == itemKey {
return true
}
}
}
return false
}
// MapValueForKey gets the value of a map value for a specified key.
func MapValueForKey(m *yaml.Node, key string) *yaml.Node {
if m == nil {
return nil
}
if m.Kind == yaml.MappingNode {
for i := 0; i < len(m.Content); i += 2 {
itemKey := m.Content[i].Value
if key == itemKey {
return m.Content[i+1]
}
}
}
return nil
}
// ConvertInterfaceArrayToStringArray converts an array of interfaces to an array of strings, if possible.
func ConvertInterfaceArrayToStringArray(interfaceArray []interface{}) []string {
stringArray := make([]string, 0)
for _, item := range interfaceArray {
v, ok := item.(string)
if ok {
stringArray = append(stringArray, v)
}
}
return stringArray
}
// SequenceNodeForNode returns a node if it is a SequenceNode.
func SequenceNodeForNode(node *yaml.Node) (*yaml.Node, bool) {
if node.Kind != yaml.SequenceNode {
return nil, false
}
return node, true
}
// BoolForScalarNode returns the bool value of a node.
func BoolForScalarNode(node *yaml.Node) (bool, bool) {
if node == nil {
return false, false
}
if node.Kind == yaml.DocumentNode {
return BoolForScalarNode(node.Content[0])
}
if node.Kind != yaml.ScalarNode {
return false, false
}
if node.Tag != "!!bool" {
return false, false
}
v, err := strconv.ParseBool(node.Value)
if err != nil {
return false, false
}
return v, true
}
// IntForScalarNode returns the integer value of a node.
func IntForScalarNode(node *yaml.Node) (int64, bool) {
if node == nil {
return 0, false
}
if node.Kind == yaml.DocumentNode {
return IntForScalarNode(node.Content[0])
}
if node.Kind != yaml.ScalarNode {
return 0, false
}
if node.Tag != "!!int" {
return 0, false
}
v, err := strconv.ParseInt(node.Value, 10, 64)
if err != nil {
return 0, false
}
return v, true
}
// FloatForScalarNode returns the float value of a node.
func FloatForScalarNode(node *yaml.Node) (float64, bool) {
if node == nil {
return 0.0, false
}
if node.Kind == yaml.DocumentNode {
return FloatForScalarNode(node.Content[0])
}
if node.Kind != yaml.ScalarNode {
return 0.0, false
}
if (node.Tag != "!!int") && (node.Tag != "!!float") {
return 0.0, false
}
v, err := strconv.ParseFloat(node.Value, 64)
if err != nil {
return 0.0, false
}
return v, true
}
// StringForScalarNode returns the string value of a node.
func StringForScalarNode(node *yaml.Node) (string, bool) {
if node == nil {
return "", false
}
if node.Kind == yaml.DocumentNode {
return StringForScalarNode(node.Content[0])
}
switch node.Kind {
case yaml.ScalarNode:
switch node.Tag {
case "!!int":
return node.Value, true
case "!!str":
return node.Value, true
case "!!timestamp":
return node.Value, true
case "!!null":
return "", true
default:
return "", false
}
default:
return "", false
}
}
// StringArrayForSequenceNode converts a sequence node to an array of strings, if possible.
func StringArrayForSequenceNode(node *yaml.Node) []string {
stringArray := make([]string, 0)
for _, item := range node.Content {
v, ok := StringForScalarNode(item)
if ok {
stringArray = append(stringArray, v)
}
}
return stringArray
}
// MissingKeysInMap identifies which keys from a list of required keys are not in a map.
func MissingKeysInMap(m *yaml.Node, requiredKeys []string) []string {
missingKeys := make([]string, 0)
for _, k := range requiredKeys {
if !MapHasKey(m, k) {
missingKeys = append(missingKeys, k)
}
}
return missingKeys
}
// InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns.
func InvalidKeysInMap(m *yaml.Node, allowedKeys []string, allowedPatterns []*regexp.Regexp) []string {
invalidKeys := make([]string, 0)
if m == nil || m.Kind != yaml.MappingNode {
return invalidKeys
}
for i := 0; i < len(m.Content); i += 2 {
key := m.Content[i].Value
found := false
// does the key match an allowed key?
for _, allowedKey := range allowedKeys {
if key == allowedKey {
found = true
break
}
}
if !found {
// does the key match an allowed pattern?
for _, allowedPattern := range allowedPatterns {
if allowedPattern.MatchString(key) {
found = true
break
}
}
if !found {
invalidKeys = append(invalidKeys, key)
}
}
}
return invalidKeys
}
// NewNullNode creates a new Null node.
func NewNullNode() *yaml.Node {
node := &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!null",
}
return node
}
// NewMappingNode creates a new Mapping node.
func NewMappingNode() *yaml.Node {
return &yaml.Node{
Kind: yaml.MappingNode,
Content: make([]*yaml.Node, 0),
}
}
// NewSequenceNode creates a new Sequence node.
func NewSequenceNode() *yaml.Node {
node := &yaml.Node{
Kind: yaml.SequenceNode,
Content: make([]*yaml.Node, 0),
}
return node
}
// NewScalarNodeForString creates a new node to hold a string.
func NewScalarNodeForString(s string) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!str",
Value: s,
}
}
// NewSequenceNodeForStringArray creates a new node to hold an array of strings.
func NewSequenceNodeForStringArray(strings []string) *yaml.Node {
node := &yaml.Node{
Kind: yaml.SequenceNode,
Content: make([]*yaml.Node, 0),
}
for _, s := range strings {
node.Content = append(node.Content, NewScalarNodeForString(s))
}
return node
}
// NewScalarNodeForBool creates a new node to hold a bool.
func NewScalarNodeForBool(b bool) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!bool",
Value: fmt.Sprintf("%t", b),
}
}
// NewScalarNodeForFloat creates a new node to hold a float.
func NewScalarNodeForFloat(f float64) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!float",
Value: fmt.Sprintf("%g", f),
}
}
// NewScalarNodeForInt creates a new node to hold an integer.
func NewScalarNodeForInt(i int64) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!int",
Value: fmt.Sprintf("%d", i),
}
}
// PluralProperties returns the string "properties" pluralized.
func PluralProperties(count int) string {
if count == 1 {
return "property"
}
return "properties"
}
// StringArrayContainsValue returns true if a string array contains a specified value.
func StringArrayContainsValue(array []string, value string) bool {
for _, item := range array {
if item == value {
return true
}
}
return false
}
// StringArrayContainsValues returns true if a string array contains all of a list of specified values.
func StringArrayContainsValues(array []string, values []string) bool {
for _, value := range values {
if !StringArrayContainsValue(array, value) {
return false
}
}
return true
}
// StringValue returns the string value of an item.
func StringValue(item interface{}) (value string, ok bool) {
value, ok = item.(string)
if ok {
return value, ok
}
intValue, ok := item.(int)
if ok {
return strconv.Itoa(intValue), true
}
return "", false
}
// Description returns a human-readable represention of an item.
func Description(item interface{}) string {
value, ok := item.(*yaml.Node)
if ok {
return jsonschema.Render(value)
}
return fmt.Sprintf("%+v", item)
}
// Display returns a description of a node for use in error messages.
func Display(node *yaml.Node) string {
switch node.Kind {
case yaml.ScalarNode:
switch node.Tag {
case "!!str":
return fmt.Sprintf("%s (string)", node.Value)
}
}
return fmt.Sprintf("%+v (%T)", node, node)
}
// Marshal creates a yaml version of a structure in our preferred style
func Marshal(in *yaml.Node) []byte {
clearStyle(in)
//bytes, _ := yaml.Marshal(&yaml.Node{Kind: yaml.DocumentNode, Content: []*yaml.Node{in}})
bytes, _ := yaml.Marshal(in)
return bytes
}
func clearStyle(node *yaml.Node) {
node.Style = 0
for _, c := range node.Content {
clearStyle(c)
}
}
gnostic-models-0.6.8/compiler/main.go 0000664 0000000 0000000 00000001275 14225377162 0017557 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
// Package compiler provides support functions to generated compiler code.
package compiler
gnostic-models-0.6.8/compiler/reader.go 0000664 0000000 0000000 00000016461 14225377162 0020100 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package compiler
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"path/filepath"
"strings"
"sync"
yaml "gopkg.in/yaml.v3"
)
var verboseReader = false
var fileCache map[string][]byte
var infoCache map[string]*yaml.Node
var fileCacheEnable = true
var infoCacheEnable = true
// These locks are used to synchronize accesses to the fileCache and infoCache
// maps (above). They are global state and can throw thread-related errors
// when modified from separate goroutines. The general strategy is to protect
// all public functions in this file with mutex Lock() calls. As a result, to
// avoid deadlock, these public functions should not call other public
// functions, so some public functions have private equivalents.
// In the future, we might consider replacing the maps with sync.Map and
// eliminating these mutexes.
var fileCacheMutex sync.Mutex
var infoCacheMutex sync.Mutex
func initializeFileCache() {
if fileCache == nil {
fileCache = make(map[string][]byte, 0)
}
}
func initializeInfoCache() {
if infoCache == nil {
infoCache = make(map[string]*yaml.Node, 0)
}
}
// EnableFileCache turns on file caching.
func EnableFileCache() {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
fileCacheEnable = true
}
// EnableInfoCache turns on parsed info caching.
func EnableInfoCache() {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
infoCacheEnable = true
}
// DisableFileCache turns off file caching.
func DisableFileCache() {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
fileCacheEnable = false
}
// DisableInfoCache turns off parsed info caching.
func DisableInfoCache() {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
infoCacheEnable = false
}
// RemoveFromFileCache removes an entry from the file cache.
func RemoveFromFileCache(fileurl string) {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
if !fileCacheEnable {
return
}
initializeFileCache()
delete(fileCache, fileurl)
}
// RemoveFromInfoCache removes an entry from the info cache.
func RemoveFromInfoCache(filename string) {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
if !infoCacheEnable {
return
}
initializeInfoCache()
delete(infoCache, filename)
}
// GetInfoCache returns the info cache map.
func GetInfoCache() map[string]*yaml.Node {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
if infoCache == nil {
initializeInfoCache()
}
return infoCache
}
// ClearFileCache clears the file cache.
func ClearFileCache() {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
fileCache = make(map[string][]byte, 0)
}
// ClearInfoCache clears the info cache.
func ClearInfoCache() {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
infoCache = make(map[string]*yaml.Node)
}
// ClearCaches clears all caches.
func ClearCaches() {
ClearFileCache()
ClearInfoCache()
}
// FetchFile gets a specified file from the local filesystem or a remote location.
func FetchFile(fileurl string) ([]byte, error) {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
return fetchFile(fileurl)
}
func fetchFile(fileurl string) ([]byte, error) {
var bytes []byte
initializeFileCache()
if fileCacheEnable {
bytes, ok := fileCache[fileurl]
if ok {
if verboseReader {
log.Printf("Cache hit %s", fileurl)
}
return bytes, nil
}
if verboseReader {
log.Printf("Fetching %s", fileurl)
}
}
response, err := http.Get(fileurl)
if err != nil {
return nil, err
}
defer response.Body.Close()
if response.StatusCode != 200 {
return nil, fmt.Errorf("Error downloading %s: %s", fileurl, response.Status)
}
bytes, err = ioutil.ReadAll(response.Body)
if fileCacheEnable && err == nil {
fileCache[fileurl] = bytes
}
return bytes, err
}
// ReadBytesForFile reads the bytes of a file.
func ReadBytesForFile(filename string) ([]byte, error) {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
return readBytesForFile(filename)
}
func readBytesForFile(filename string) ([]byte, error) {
// is the filename a url?
fileurl, _ := url.Parse(filename)
if fileurl.Scheme != "" {
// yes, fetch it
bytes, err := fetchFile(filename)
if err != nil {
return nil, err
}
return bytes, nil
}
// no, it's a local filename
bytes, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
return bytes, nil
}
// ReadInfoFromBytes unmarshals a file as a *yaml.Node.
func ReadInfoFromBytes(filename string, bytes []byte) (*yaml.Node, error) {
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
return readInfoFromBytes(filename, bytes)
}
func readInfoFromBytes(filename string, bytes []byte) (*yaml.Node, error) {
initializeInfoCache()
if infoCacheEnable {
cachedInfo, ok := infoCache[filename]
if ok {
if verboseReader {
log.Printf("Cache hit info for file %s", filename)
}
return cachedInfo, nil
}
if verboseReader {
log.Printf("Reading info for file %s", filename)
}
}
var info yaml.Node
err := yaml.Unmarshal(bytes, &info)
if err != nil {
return nil, err
}
if infoCacheEnable && len(filename) > 0 {
infoCache[filename] = &info
}
return &info, nil
}
// ReadInfoForRef reads a file and return the fragment needed to resolve a $ref.
func ReadInfoForRef(basefile string, ref string) (*yaml.Node, error) {
fileCacheMutex.Lock()
defer fileCacheMutex.Unlock()
infoCacheMutex.Lock()
defer infoCacheMutex.Unlock()
initializeInfoCache()
if infoCacheEnable {
info, ok := infoCache[ref]
if ok {
if verboseReader {
log.Printf("Cache hit for ref %s#%s", basefile, ref)
}
return info, nil
}
if verboseReader {
log.Printf("Reading info for ref %s#%s", basefile, ref)
}
}
basedir, _ := filepath.Split(basefile)
parts := strings.Split(ref, "#")
var filename string
if parts[0] != "" {
filename = parts[0]
if _, err := url.ParseRequestURI(parts[0]); err != nil {
// It is not an URL, so the file is local
filename = basedir + parts[0]
}
} else {
filename = basefile
}
bytes, err := readBytesForFile(filename)
if err != nil {
return nil, err
}
info, err := readInfoFromBytes(filename, bytes)
if info != nil && info.Kind == yaml.DocumentNode {
info = info.Content[0]
}
if err != nil {
log.Printf("File error: %v\n", err)
} else {
if info == nil {
return nil, NewError(nil, fmt.Sprintf("could not resolve %s", ref))
}
if len(parts) > 1 {
path := strings.Split(parts[1], "/")
for i, key := range path {
if i > 0 {
m := info
if true {
found := false
for i := 0; i < len(m.Content); i += 2 {
if m.Content[i].Value == key {
info = m.Content[i+1]
found = true
}
}
if !found {
infoCache[ref] = nil
return nil, NewError(nil, fmt.Sprintf("could not resolve %s", ref))
}
}
}
}
}
}
if infoCacheEnable {
infoCache[ref] = info
}
return info, nil
}
gnostic-models-0.6.8/discovery/ 0000775 0000000 0000000 00000000000 14225377162 0016474 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/discovery/README.md 0000664 0000000 0000000 00000001215 14225377162 0017752 0 ustar 00root root 0000000 0000000 # API Discovery Format
This directory contains a Protocol Buffer-language model and related code for
supporting Google's API Discovery Format.
Gnostic applications and plugins can use Discovery.proto to generate Protocol
Buffer support code for their preferred languages.
Discovery.go is used by Gnostic to read JSON and YAML Discovery descriptions
into the Protocol Buffer-based datastructures generated from Discovery.proto.
Discovery.proto and Discovery.go are generated by the Gnostic compiler
generator, and Discovery.pb.go is generated by protoc, the Protocol Buffer
compiler, and protoc-gen-go, the Protocol Buffer Go code generation plugin.
gnostic-models-0.6.8/discovery/discovery.go 0000664 0000000 0000000 00000310663 14225377162 0021043 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
package discovery_v1
import (
"fmt"
"regexp"
"strings"
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/compiler"
)
// Version returns the package name (and OpenAPI version).
func Version() string {
return "discovery_v1"
}
// NewAnnotations creates an object of type Annotations if possible, returning an error if not.
func NewAnnotations(in *yaml.Node, context *compiler.Context) (*Annotations, error) {
errors := make([]error, 0)
x := &Annotations{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"required"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated string required = 1;
v1 := compiler.MapValueForKey(m, "required")
if v1 != nil {
v, ok := compiler.SequenceNodeForNode(v1)
if ok {
x.Required = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewAny creates an object of type Any if possible, returning an error if not.
func NewAny(in *yaml.Node, context *compiler.Context) (*Any, error) {
errors := make([]error, 0)
x := &Any{}
bytes := compiler.Marshal(in)
x.Yaml = string(bytes)
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewAuth creates an object of type Auth if possible, returning an error if not.
func NewAuth(in *yaml.Node, context *compiler.Context) (*Auth, error) {
errors := make([]error, 0)
x := &Auth{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"oauth2"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// Oauth2 oauth2 = 1;
v1 := compiler.MapValueForKey(m, "oauth2")
if v1 != nil {
var err error
x.Oauth2, err = NewOauth2(v1, compiler.NewContext("oauth2", v1, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDocument creates an object of type Document if possible, returning an error if not.
func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error) {
errors := make([]error, 0)
x := &Document{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"discoveryVersion", "kind"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"auth", "basePath", "baseUrl", "batchPath", "canonicalName", "description", "discoveryVersion", "documentationLink", "etag", "features", "fullyEncodeReservedExpansion", "icons", "id", "kind", "labels", "methods", "mtlsRootUrl", "name", "ownerDomain", "ownerName", "packagePath", "parameters", "protocol", "resources", "revision", "rootUrl", "schemas", "servicePath", "title", "version", "version_module"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string kind = 1;
v1 := compiler.MapValueForKey(m, "kind")
if v1 != nil {
x.Kind, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for kind: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string discovery_version = 2;
v2 := compiler.MapValueForKey(m, "discoveryVersion")
if v2 != nil {
x.DiscoveryVersion, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for discoveryVersion: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string id = 3;
v3 := compiler.MapValueForKey(m, "id")
if v3 != nil {
x.Id, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for id: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 4;
v4 := compiler.MapValueForKey(m, "name")
if v4 != nil {
x.Name, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string version = 5;
v5 := compiler.MapValueForKey(m, "version")
if v5 != nil {
x.Version, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for version: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string revision = 6;
v6 := compiler.MapValueForKey(m, "revision")
if v6 != nil {
x.Revision, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for revision: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string title = 7;
v7 := compiler.MapValueForKey(m, "title")
if v7 != nil {
x.Title, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 8;
v8 := compiler.MapValueForKey(m, "description")
if v8 != nil {
x.Description, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// Icons icons = 9;
v9 := compiler.MapValueForKey(m, "icons")
if v9 != nil {
var err error
x.Icons, err = NewIcons(v9, compiler.NewContext("icons", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// string documentation_link = 10;
v10 := compiler.MapValueForKey(m, "documentationLink")
if v10 != nil {
x.DocumentationLink, ok = compiler.StringForScalarNode(v10)
if !ok {
message := fmt.Sprintf("has unexpected value for documentationLink: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string labels = 11;
v11 := compiler.MapValueForKey(m, "labels")
if v11 != nil {
v, ok := compiler.SequenceNodeForNode(v11)
if ok {
x.Labels = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for labels: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// string protocol = 12;
v12 := compiler.MapValueForKey(m, "protocol")
if v12 != nil {
x.Protocol, ok = compiler.StringForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for protocol: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// string base_url = 13;
v13 := compiler.MapValueForKey(m, "baseUrl")
if v13 != nil {
x.BaseUrl, ok = compiler.StringForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for baseUrl: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// string base_path = 14;
v14 := compiler.MapValueForKey(m, "basePath")
if v14 != nil {
x.BasePath, ok = compiler.StringForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for basePath: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// string root_url = 15;
v15 := compiler.MapValueForKey(m, "rootUrl")
if v15 != nil {
x.RootUrl, ok = compiler.StringForScalarNode(v15)
if !ok {
message := fmt.Sprintf("has unexpected value for rootUrl: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// string service_path = 16;
v16 := compiler.MapValueForKey(m, "servicePath")
if v16 != nil {
x.ServicePath, ok = compiler.StringForScalarNode(v16)
if !ok {
message := fmt.Sprintf("has unexpected value for servicePath: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// string batch_path = 17;
v17 := compiler.MapValueForKey(m, "batchPath")
if v17 != nil {
x.BatchPath, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for batchPath: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// Parameters parameters = 18;
v18 := compiler.MapValueForKey(m, "parameters")
if v18 != nil {
var err error
x.Parameters, err = NewParameters(v18, compiler.NewContext("parameters", v18, context))
if err != nil {
errors = append(errors, err)
}
}
// Auth auth = 19;
v19 := compiler.MapValueForKey(m, "auth")
if v19 != nil {
var err error
x.Auth, err = NewAuth(v19, compiler.NewContext("auth", v19, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated string features = 20;
v20 := compiler.MapValueForKey(m, "features")
if v20 != nil {
v, ok := compiler.SequenceNodeForNode(v20)
if ok {
x.Features = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for features: %s", compiler.Display(v20))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schemas schemas = 21;
v21 := compiler.MapValueForKey(m, "schemas")
if v21 != nil {
var err error
x.Schemas, err = NewSchemas(v21, compiler.NewContext("schemas", v21, context))
if err != nil {
errors = append(errors, err)
}
}
// Methods methods = 22;
v22 := compiler.MapValueForKey(m, "methods")
if v22 != nil {
var err error
x.Methods, err = NewMethods(v22, compiler.NewContext("methods", v22, context))
if err != nil {
errors = append(errors, err)
}
}
// Resources resources = 23;
v23 := compiler.MapValueForKey(m, "resources")
if v23 != nil {
var err error
x.Resources, err = NewResources(v23, compiler.NewContext("resources", v23, context))
if err != nil {
errors = append(errors, err)
}
}
// string etag = 24;
v24 := compiler.MapValueForKey(m, "etag")
if v24 != nil {
x.Etag, ok = compiler.StringForScalarNode(v24)
if !ok {
message := fmt.Sprintf("has unexpected value for etag: %s", compiler.Display(v24))
errors = append(errors, compiler.NewError(context, message))
}
}
// string owner_domain = 25;
v25 := compiler.MapValueForKey(m, "ownerDomain")
if v25 != nil {
x.OwnerDomain, ok = compiler.StringForScalarNode(v25)
if !ok {
message := fmt.Sprintf("has unexpected value for ownerDomain: %s", compiler.Display(v25))
errors = append(errors, compiler.NewError(context, message))
}
}
// string owner_name = 26;
v26 := compiler.MapValueForKey(m, "ownerName")
if v26 != nil {
x.OwnerName, ok = compiler.StringForScalarNode(v26)
if !ok {
message := fmt.Sprintf("has unexpected value for ownerName: %s", compiler.Display(v26))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool version_module = 27;
v27 := compiler.MapValueForKey(m, "version_module")
if v27 != nil {
x.VersionModule, ok = compiler.BoolForScalarNode(v27)
if !ok {
message := fmt.Sprintf("has unexpected value for version_module: %s", compiler.Display(v27))
errors = append(errors, compiler.NewError(context, message))
}
}
// string canonical_name = 28;
v28 := compiler.MapValueForKey(m, "canonicalName")
if v28 != nil {
x.CanonicalName, ok = compiler.StringForScalarNode(v28)
if !ok {
message := fmt.Sprintf("has unexpected value for canonicalName: %s", compiler.Display(v28))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool fully_encode_reserved_expansion = 29;
v29 := compiler.MapValueForKey(m, "fullyEncodeReservedExpansion")
if v29 != nil {
x.FullyEncodeReservedExpansion, ok = compiler.BoolForScalarNode(v29)
if !ok {
message := fmt.Sprintf("has unexpected value for fullyEncodeReservedExpansion: %s", compiler.Display(v29))
errors = append(errors, compiler.NewError(context, message))
}
}
// string package_path = 30;
v30 := compiler.MapValueForKey(m, "packagePath")
if v30 != nil {
x.PackagePath, ok = compiler.StringForScalarNode(v30)
if !ok {
message := fmt.Sprintf("has unexpected value for packagePath: %s", compiler.Display(v30))
errors = append(errors, compiler.NewError(context, message))
}
}
// string mtls_root_url = 31;
v31 := compiler.MapValueForKey(m, "mtlsRootUrl")
if v31 != nil {
x.MtlsRootUrl, ok = compiler.StringForScalarNode(v31)
if !ok {
message := fmt.Sprintf("has unexpected value for mtlsRootUrl: %s", compiler.Display(v31))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewIcons creates an object of type Icons if possible, returning an error if not.
func NewIcons(in *yaml.Node, context *compiler.Context) (*Icons, error) {
errors := make([]error, 0)
x := &Icons{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"x16", "x32"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"x16", "x32"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string x16 = 1;
v1 := compiler.MapValueForKey(m, "x16")
if v1 != nil {
x.X16, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for x16: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string x32 = 2;
v2 := compiler.MapValueForKey(m, "x32")
if v2 != nil {
x.X32, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for x32: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewMediaUpload creates an object of type MediaUpload if possible, returning an error if not.
func NewMediaUpload(in *yaml.Node, context *compiler.Context) (*MediaUpload, error) {
errors := make([]error, 0)
x := &MediaUpload{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"accept", "maxSize", "protocols", "supportsSubscription"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated string accept = 1;
v1 := compiler.MapValueForKey(m, "accept")
if v1 != nil {
v, ok := compiler.SequenceNodeForNode(v1)
if ok {
x.Accept = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for accept: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string max_size = 2;
v2 := compiler.MapValueForKey(m, "maxSize")
if v2 != nil {
x.MaxSize, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for maxSize: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Protocols protocols = 3;
v3 := compiler.MapValueForKey(m, "protocols")
if v3 != nil {
var err error
x.Protocols, err = NewProtocols(v3, compiler.NewContext("protocols", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// bool supports_subscription = 4;
v4 := compiler.MapValueForKey(m, "supportsSubscription")
if v4 != nil {
x.SupportsSubscription, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for supportsSubscription: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewMethod creates an object of type Method if possible, returning an error if not.
func NewMethod(in *yaml.Node, context *compiler.Context) (*Method, error) {
errors := make([]error, 0)
x := &Method{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"description", "etagRequired", "flatPath", "httpMethod", "id", "mediaUpload", "parameterOrder", "parameters", "path", "request", "response", "scopes", "streamingType", "supportsMediaDownload", "supportsMediaUpload", "supportsSubscription", "useMediaDownloadService"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string id = 1;
v1 := compiler.MapValueForKey(m, "id")
if v1 != nil {
x.Id, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for id: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string path = 2;
v2 := compiler.MapValueForKey(m, "path")
if v2 != nil {
x.Path, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for path: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string http_method = 3;
v3 := compiler.MapValueForKey(m, "httpMethod")
if v3 != nil {
x.HttpMethod, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for httpMethod: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 4;
v4 := compiler.MapValueForKey(m, "description")
if v4 != nil {
x.Description, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Parameters parameters = 5;
v5 := compiler.MapValueForKey(m, "parameters")
if v5 != nil {
var err error
x.Parameters, err = NewParameters(v5, compiler.NewContext("parameters", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated string parameter_order = 6;
v6 := compiler.MapValueForKey(m, "parameterOrder")
if v6 != nil {
v, ok := compiler.SequenceNodeForNode(v6)
if ok {
x.ParameterOrder = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for parameterOrder: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// Request request = 7;
v7 := compiler.MapValueForKey(m, "request")
if v7 != nil {
var err error
x.Request, err = NewRequest(v7, compiler.NewContext("request", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// Response response = 8;
v8 := compiler.MapValueForKey(m, "response")
if v8 != nil {
var err error
x.Response, err = NewResponse(v8, compiler.NewContext("response", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated string scopes = 9;
v9 := compiler.MapValueForKey(m, "scopes")
if v9 != nil {
v, ok := compiler.SequenceNodeForNode(v9)
if ok {
x.Scopes = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for scopes: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool supports_media_download = 10;
v10 := compiler.MapValueForKey(m, "supportsMediaDownload")
if v10 != nil {
x.SupportsMediaDownload, ok = compiler.BoolForScalarNode(v10)
if !ok {
message := fmt.Sprintf("has unexpected value for supportsMediaDownload: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool supports_media_upload = 11;
v11 := compiler.MapValueForKey(m, "supportsMediaUpload")
if v11 != nil {
x.SupportsMediaUpload, ok = compiler.BoolForScalarNode(v11)
if !ok {
message := fmt.Sprintf("has unexpected value for supportsMediaUpload: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool use_media_download_service = 12;
v12 := compiler.MapValueForKey(m, "useMediaDownloadService")
if v12 != nil {
x.UseMediaDownloadService, ok = compiler.BoolForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for useMediaDownloadService: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// MediaUpload media_upload = 13;
v13 := compiler.MapValueForKey(m, "mediaUpload")
if v13 != nil {
var err error
x.MediaUpload, err = NewMediaUpload(v13, compiler.NewContext("mediaUpload", v13, context))
if err != nil {
errors = append(errors, err)
}
}
// bool supports_subscription = 14;
v14 := compiler.MapValueForKey(m, "supportsSubscription")
if v14 != nil {
x.SupportsSubscription, ok = compiler.BoolForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for supportsSubscription: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// string flat_path = 15;
v15 := compiler.MapValueForKey(m, "flatPath")
if v15 != nil {
x.FlatPath, ok = compiler.StringForScalarNode(v15)
if !ok {
message := fmt.Sprintf("has unexpected value for flatPath: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool etag_required = 16;
v16 := compiler.MapValueForKey(m, "etagRequired")
if v16 != nil {
x.EtagRequired, ok = compiler.BoolForScalarNode(v16)
if !ok {
message := fmt.Sprintf("has unexpected value for etagRequired: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// string streaming_type = 17;
v17 := compiler.MapValueForKey(m, "streamingType")
if v17 != nil {
x.StreamingType, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for streamingType: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewMethods creates an object of type Methods if possible, returning an error if not.
func NewMethods(in *yaml.Node, context *compiler.Context) (*Methods, error) {
errors := make([]error, 0)
x := &Methods{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedMethod additional_properties = 1;
// MAP: Method
x.AdditionalProperties = make([]*NamedMethod, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedMethod{}
pair.Name = k
var err error
pair.Value, err = NewMethod(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedMethod creates an object of type NamedMethod if possible, returning an error if not.
func NewNamedMethod(in *yaml.Node, context *compiler.Context) (*NamedMethod, error) {
errors := make([]error, 0)
x := &NamedMethod{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Method value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewMethod(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not.
func NewNamedParameter(in *yaml.Node, context *compiler.Context) (*NamedParameter, error) {
errors := make([]error, 0)
x := &NamedParameter{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Parameter value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewParameter(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedResource creates an object of type NamedResource if possible, returning an error if not.
func NewNamedResource(in *yaml.Node, context *compiler.Context) (*NamedResource, error) {
errors := make([]error, 0)
x := &NamedResource{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Resource value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewResource(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not.
func NewNamedSchema(in *yaml.Node, context *compiler.Context) (*NamedSchema, error) {
errors := make([]error, 0)
x := &NamedSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schema value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewSchema(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedScope creates an object of type NamedScope if possible, returning an error if not.
func NewNamedScope(in *yaml.Node, context *compiler.Context) (*NamedScope, error) {
errors := make([]error, 0)
x := &NamedScope{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Scope value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewScope(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2 creates an object of type Oauth2 if possible, returning an error if not.
func NewOauth2(in *yaml.Node, context *compiler.Context) (*Oauth2, error) {
errors := make([]error, 0)
x := &Oauth2{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"scopes"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// Scopes scopes = 1;
v1 := compiler.MapValueForKey(m, "scopes")
if v1 != nil {
var err error
x.Scopes, err = NewScopes(v1, compiler.NewContext("scopes", v1, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameter creates an object of type Parameter if possible, returning an error if not.
func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error) {
errors := make([]error, 0)
x := &Parameter{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "additionalProperties", "annotations", "default", "description", "enum", "enumDescriptions", "format", "id", "items", "location", "maximum", "minimum", "pattern", "properties", "repeated", "required", "type"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string id = 1;
v1 := compiler.MapValueForKey(m, "id")
if v1 != nil {
x.Id, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for id: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 2;
v2 := compiler.MapValueForKey(m, "type")
if v2 != nil {
x.Type, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string _ref = 3;
v3 := compiler.MapValueForKey(m, "$ref")
if v3 != nil {
x.XRef, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 4;
v4 := compiler.MapValueForKey(m, "description")
if v4 != nil {
x.Description, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string default = 5;
v5 := compiler.MapValueForKey(m, "default")
if v5 != nil {
x.Default, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for default: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool required = 6;
v6 := compiler.MapValueForKey(m, "required")
if v6 != nil {
x.Required, ok = compiler.BoolForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 7;
v7 := compiler.MapValueForKey(m, "format")
if v7 != nil {
x.Format, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 8;
v8 := compiler.MapValueForKey(m, "pattern")
if v8 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// string minimum = 9;
v9 := compiler.MapValueForKey(m, "minimum")
if v9 != nil {
x.Minimum, ok = compiler.StringForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// string maximum = 10;
v10 := compiler.MapValueForKey(m, "maximum")
if v10 != nil {
x.Maximum, ok = compiler.StringForScalarNode(v10)
if !ok {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string enum = 11;
v11 := compiler.MapValueForKey(m, "enum")
if v11 != nil {
v, ok := compiler.SequenceNodeForNode(v11)
if ok {
x.Enum = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for enum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string enum_descriptions = 12;
v12 := compiler.MapValueForKey(m, "enumDescriptions")
if v12 != nil {
v, ok := compiler.SequenceNodeForNode(v12)
if ok {
x.EnumDescriptions = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for enumDescriptions: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool repeated = 13;
v13 := compiler.MapValueForKey(m, "repeated")
if v13 != nil {
x.Repeated, ok = compiler.BoolForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for repeated: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// string location = 14;
v14 := compiler.MapValueForKey(m, "location")
if v14 != nil {
x.Location, ok = compiler.StringForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for location: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schemas properties = 15;
v15 := compiler.MapValueForKey(m, "properties")
if v15 != nil {
var err error
x.Properties, err = NewSchemas(v15, compiler.NewContext("properties", v15, context))
if err != nil {
errors = append(errors, err)
}
}
// Schema additional_properties = 16;
v16 := compiler.MapValueForKey(m, "additionalProperties")
if v16 != nil {
var err error
x.AdditionalProperties, err = NewSchema(v16, compiler.NewContext("additionalProperties", v16, context))
if err != nil {
errors = append(errors, err)
}
}
// Schema items = 17;
v17 := compiler.MapValueForKey(m, "items")
if v17 != nil {
var err error
x.Items, err = NewSchema(v17, compiler.NewContext("items", v17, context))
if err != nil {
errors = append(errors, err)
}
}
// Annotations annotations = 18;
v18 := compiler.MapValueForKey(m, "annotations")
if v18 != nil {
var err error
x.Annotations, err = NewAnnotations(v18, compiler.NewContext("annotations", v18, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameters creates an object of type Parameters if possible, returning an error if not.
func NewParameters(in *yaml.Node, context *compiler.Context) (*Parameters, error) {
errors := make([]error, 0)
x := &Parameters{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedParameter additional_properties = 1;
// MAP: Parameter
x.AdditionalProperties = make([]*NamedParameter, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedParameter{}
pair.Name = k
var err error
pair.Value, err = NewParameter(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewProtocols creates an object of type Protocols if possible, returning an error if not.
func NewProtocols(in *yaml.Node, context *compiler.Context) (*Protocols, error) {
errors := make([]error, 0)
x := &Protocols{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"resumable", "simple"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// Simple simple = 1;
v1 := compiler.MapValueForKey(m, "simple")
if v1 != nil {
var err error
x.Simple, err = NewSimple(v1, compiler.NewContext("simple", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// Resumable resumable = 2;
v2 := compiler.MapValueForKey(m, "resumable")
if v2 != nil {
var err error
x.Resumable, err = NewResumable(v2, compiler.NewContext("resumable", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewRequest creates an object of type Request if possible, returning an error if not.
func NewRequest(in *yaml.Node, context *compiler.Context) (*Request, error) {
errors := make([]error, 0)
x := &Request{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "parameterName"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string parameter_name = 2;
v2 := compiler.MapValueForKey(m, "parameterName")
if v2 != nil {
x.ParameterName, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for parameterName: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResource creates an object of type Resource if possible, returning an error if not.
func NewResource(in *yaml.Node, context *compiler.Context) (*Resource, error) {
errors := make([]error, 0)
x := &Resource{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"methods", "resources"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// Methods methods = 1;
v1 := compiler.MapValueForKey(m, "methods")
if v1 != nil {
var err error
x.Methods, err = NewMethods(v1, compiler.NewContext("methods", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// Resources resources = 2;
v2 := compiler.MapValueForKey(m, "resources")
if v2 != nil {
var err error
x.Resources, err = NewResources(v2, compiler.NewContext("resources", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResources creates an object of type Resources if possible, returning an error if not.
func NewResources(in *yaml.Node, context *compiler.Context) (*Resources, error) {
errors := make([]error, 0)
x := &Resources{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedResource additional_properties = 1;
// MAP: Resource
x.AdditionalProperties = make([]*NamedResource, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedResource{}
pair.Name = k
var err error
pair.Value, err = NewResource(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponse creates an object of type Response if possible, returning an error if not.
func NewResponse(in *yaml.Node, context *compiler.Context) (*Response, error) {
errors := make([]error, 0)
x := &Response{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResumable creates an object of type Resumable if possible, returning an error if not.
func NewResumable(in *yaml.Node, context *compiler.Context) (*Resumable, error) {
errors := make([]error, 0)
x := &Resumable{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"multipart", "path"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool multipart = 1;
v1 := compiler.MapValueForKey(m, "multipart")
if v1 != nil {
x.Multipart, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for multipart: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string path = 2;
v2 := compiler.MapValueForKey(m, "path")
if v2 != nil {
x.Path, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for path: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchema creates an object of type Schema if possible, returning an error if not.
func NewSchema(in *yaml.Node, context *compiler.Context) (*Schema, error) {
errors := make([]error, 0)
x := &Schema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "additionalProperties", "annotations", "default", "description", "enum", "enumDescriptions", "format", "id", "items", "location", "maximum", "minimum", "pattern", "properties", "readOnly", "repeated", "required", "type"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string id = 1;
v1 := compiler.MapValueForKey(m, "id")
if v1 != nil {
x.Id, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for id: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 2;
v2 := compiler.MapValueForKey(m, "type")
if v2 != nil {
x.Type, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string default = 4;
v4 := compiler.MapValueForKey(m, "default")
if v4 != nil {
x.Default, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for default: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool required = 5;
v5 := compiler.MapValueForKey(m, "required")
if v5 != nil {
x.Required, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 6;
v6 := compiler.MapValueForKey(m, "format")
if v6 != nil {
x.Format, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 7;
v7 := compiler.MapValueForKey(m, "pattern")
if v7 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// string minimum = 8;
v8 := compiler.MapValueForKey(m, "minimum")
if v8 != nil {
x.Minimum, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// string maximum = 9;
v9 := compiler.MapValueForKey(m, "maximum")
if v9 != nil {
x.Maximum, ok = compiler.StringForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string enum = 10;
v10 := compiler.MapValueForKey(m, "enum")
if v10 != nil {
v, ok := compiler.SequenceNodeForNode(v10)
if ok {
x.Enum = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for enum: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string enum_descriptions = 11;
v11 := compiler.MapValueForKey(m, "enumDescriptions")
if v11 != nil {
v, ok := compiler.SequenceNodeForNode(v11)
if ok {
x.EnumDescriptions = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for enumDescriptions: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool repeated = 12;
v12 := compiler.MapValueForKey(m, "repeated")
if v12 != nil {
x.Repeated, ok = compiler.BoolForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for repeated: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// string location = 13;
v13 := compiler.MapValueForKey(m, "location")
if v13 != nil {
x.Location, ok = compiler.StringForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for location: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schemas properties = 14;
v14 := compiler.MapValueForKey(m, "properties")
if v14 != nil {
var err error
x.Properties, err = NewSchemas(v14, compiler.NewContext("properties", v14, context))
if err != nil {
errors = append(errors, err)
}
}
// Schema additional_properties = 15;
v15 := compiler.MapValueForKey(m, "additionalProperties")
if v15 != nil {
var err error
x.AdditionalProperties, err = NewSchema(v15, compiler.NewContext("additionalProperties", v15, context))
if err != nil {
errors = append(errors, err)
}
}
// Schema items = 16;
v16 := compiler.MapValueForKey(m, "items")
if v16 != nil {
var err error
x.Items, err = NewSchema(v16, compiler.NewContext("items", v16, context))
if err != nil {
errors = append(errors, err)
}
}
// string _ref = 17;
v17 := compiler.MapValueForKey(m, "$ref")
if v17 != nil {
x.XRef, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// Annotations annotations = 18;
v18 := compiler.MapValueForKey(m, "annotations")
if v18 != nil {
var err error
x.Annotations, err = NewAnnotations(v18, compiler.NewContext("annotations", v18, context))
if err != nil {
errors = append(errors, err)
}
}
// bool read_only = 19;
v19 := compiler.MapValueForKey(m, "readOnly")
if v19 != nil {
x.ReadOnly, ok = compiler.BoolForScalarNode(v19)
if !ok {
message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchemas creates an object of type Schemas if possible, returning an error if not.
func NewSchemas(in *yaml.Node, context *compiler.Context) (*Schemas, error) {
errors := make([]error, 0)
x := &Schemas{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSchema additional_properties = 1;
// MAP: Schema
x.AdditionalProperties = make([]*NamedSchema, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSchema{}
pair.Name = k
var err error
pair.Value, err = NewSchema(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewScope creates an object of type Scope if possible, returning an error if not.
func NewScope(in *yaml.Node, context *compiler.Context) (*Scope, error) {
errors := make([]error, 0)
x := &Scope{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"description"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewScopes creates an object of type Scopes if possible, returning an error if not.
func NewScopes(in *yaml.Node, context *compiler.Context) (*Scopes, error) {
errors := make([]error, 0)
x := &Scopes{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedScope additional_properties = 1;
// MAP: Scope
x.AdditionalProperties = make([]*NamedScope, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedScope{}
pair.Name = k
var err error
pair.Value, err = NewScope(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSimple creates an object of type Simple if possible, returning an error if not.
func NewSimple(in *yaml.Node, context *compiler.Context) (*Simple, error) {
errors := make([]error, 0)
x := &Simple{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"multipart", "path"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool multipart = 1;
v1 := compiler.MapValueForKey(m, "multipart")
if v1 != nil {
x.Multipart, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for multipart: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string path = 2;
v2 := compiler.MapValueForKey(m, "path")
if v2 != nil {
x.Path, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for path: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewStringArray creates an object of type StringArray if possible, returning an error if not.
func NewStringArray(in *yaml.Node, context *compiler.Context) (*StringArray, error) {
errors := make([]error, 0)
x := &StringArray{}
x.Value = make([]string, 0)
for _, node := range in.Content {
s, _ := compiler.StringForScalarNode(node)
x.Value = append(x.Value, s)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Annotations objects.
func (m *Annotations) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Any objects.
func (m *Any) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Auth objects.
func (m *Auth) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Oauth2 != nil {
_, err := m.Oauth2.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Document objects.
func (m *Document) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Icons != nil {
_, err := m.Icons.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Parameters != nil {
_, err := m.Parameters.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Auth != nil {
_, err := m.Auth.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Schemas != nil {
_, err := m.Schemas.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Methods != nil {
_, err := m.Methods.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Resources != nil {
_, err := m.Resources.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Icons objects.
func (m *Icons) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside MediaUpload objects.
func (m *MediaUpload) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Protocols != nil {
_, err := m.Protocols.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Method objects.
func (m *Method) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Parameters != nil {
_, err := m.Parameters.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Request != nil {
_, err := m.Request.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Response != nil {
_, err := m.Response.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.MediaUpload != nil {
_, err := m.MediaUpload.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Methods objects.
func (m *Methods) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedMethod objects.
func (m *NamedMethod) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedParameter objects.
func (m *NamedParameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedResource objects.
func (m *NamedResource) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedSchema objects.
func (m *NamedSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedScope objects.
func (m *NamedScope) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2 objects.
func (m *Oauth2) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Parameter objects.
func (m *Parameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewParameter(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
if m.Properties != nil {
_, err := m.Properties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.AdditionalProperties != nil {
_, err := m.AdditionalProperties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Annotations != nil {
_, err := m.Annotations.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Parameters objects.
func (m *Parameters) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Protocols objects.
func (m *Protocols) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Simple != nil {
_, err := m.Simple.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Resumable != nil {
_, err := m.Resumable.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Request objects.
func (m *Request) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewRequest(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Resource objects.
func (m *Resource) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Methods != nil {
_, err := m.Methods.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Resources != nil {
_, err := m.Resources.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Resources objects.
func (m *Resources) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Response objects.
func (m *Response) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
return info, nil
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Resumable objects.
func (m *Resumable) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Schema objects.
func (m *Schema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Properties != nil {
_, err := m.Properties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.AdditionalProperties != nil {
_, err := m.AdditionalProperties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewSchema(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
if m.Annotations != nil {
_, err := m.Annotations.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Schemas objects.
func (m *Schemas) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Scope objects.
func (m *Scope) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Scopes objects.
func (m *Scopes) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Simple objects.
func (m *Simple) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside StringArray objects.
func (m *StringArray) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ToRawInfo returns a description of Annotations suitable for JSON or YAML export.
func (m *Annotations) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Required) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required))
}
return info
}
// ToRawInfo returns a description of Any suitable for JSON or YAML export.
func (m *Any) ToRawInfo() *yaml.Node {
var err error
var node yaml.Node
err = yaml.Unmarshal([]byte(m.Yaml), &node)
if err == nil {
if node.Kind == yaml.DocumentNode {
return node.Content[0]
}
return &node
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Auth suitable for JSON or YAML export.
func (m *Auth) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Oauth2 != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("oauth2"))
info.Content = append(info.Content, m.Oauth2.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of Document suitable for JSON or YAML export.
func (m *Document) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("kind"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Kind))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("discoveryVersion"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.DiscoveryVersion))
if m.Id != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("id"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Id))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Version != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("version"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Version))
}
if m.Revision != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("revision"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Revision))
}
if m.Title != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Icons != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("icons"))
info.Content = append(info.Content, m.Icons.ToRawInfo())
}
if m.DocumentationLink != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("documentationLink"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.DocumentationLink))
}
if len(m.Labels) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("labels"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Labels))
}
if m.Protocol != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("protocol"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Protocol))
}
if m.BaseUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("baseUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BaseUrl))
}
if m.BasePath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("basePath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BasePath))
}
if m.RootUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("rootUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.RootUrl))
}
if m.ServicePath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("servicePath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.ServicePath))
}
if m.BatchPath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("batchPath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BatchPath))
}
if m.Parameters != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, m.Parameters.ToRawInfo())
}
if m.Auth != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("auth"))
info.Content = append(info.Content, m.Auth.ToRawInfo())
}
if len(m.Features) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("features"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Features))
}
if m.Schemas != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schemas"))
info.Content = append(info.Content, m.Schemas.ToRawInfo())
}
if m.Methods != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("methods"))
info.Content = append(info.Content, m.Methods.ToRawInfo())
}
if m.Resources != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("resources"))
info.Content = append(info.Content, m.Resources.ToRawInfo())
}
if m.Etag != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("etag"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Etag))
}
if m.OwnerDomain != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("ownerDomain"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OwnerDomain))
}
if m.OwnerName != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("ownerName"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OwnerName))
}
if m.VersionModule != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("version_module"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.VersionModule))
}
if m.CanonicalName != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("canonicalName"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CanonicalName))
}
if m.FullyEncodeReservedExpansion != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("fullyEncodeReservedExpansion"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.FullyEncodeReservedExpansion))
}
if m.PackagePath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("packagePath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.PackagePath))
}
if m.MtlsRootUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("mtlsRootUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.MtlsRootUrl))
}
return info
}
// ToRawInfo returns a description of Icons suitable for JSON or YAML export.
func (m *Icons) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("x16"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.X16))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("x32"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.X32))
return info
}
// ToRawInfo returns a description of MediaUpload suitable for JSON or YAML export.
func (m *MediaUpload) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Accept) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("accept"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Accept))
}
if m.MaxSize != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxSize"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.MaxSize))
}
if m.Protocols != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("protocols"))
info.Content = append(info.Content, m.Protocols.ToRawInfo())
}
if m.SupportsSubscription != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("supportsSubscription"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.SupportsSubscription))
}
return info
}
// ToRawInfo returns a description of Method suitable for JSON or YAML export.
func (m *Method) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Id != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("id"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Id))
}
if m.Path != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("path"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Path))
}
if m.HttpMethod != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("httpMethod"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.HttpMethod))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Parameters != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, m.Parameters.ToRawInfo())
}
if len(m.ParameterOrder) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameterOrder"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.ParameterOrder))
}
if m.Request != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("request"))
info.Content = append(info.Content, m.Request.ToRawInfo())
}
if m.Response != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("response"))
info.Content = append(info.Content, m.Response.ToRawInfo())
}
if len(m.Scopes) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Scopes))
}
if m.SupportsMediaDownload != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("supportsMediaDownload"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.SupportsMediaDownload))
}
if m.SupportsMediaUpload != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("supportsMediaUpload"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.SupportsMediaUpload))
}
if m.UseMediaDownloadService != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("useMediaDownloadService"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UseMediaDownloadService))
}
if m.MediaUpload != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("mediaUpload"))
info.Content = append(info.Content, m.MediaUpload.ToRawInfo())
}
if m.SupportsSubscription != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("supportsSubscription"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.SupportsSubscription))
}
if m.FlatPath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("flatPath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.FlatPath))
}
if m.EtagRequired != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("etagRequired"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.EtagRequired))
}
if m.StreamingType != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("streamingType"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.StreamingType))
}
return info
}
// ToRawInfo returns a description of Methods suitable for JSON or YAML export.
func (m *Methods) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of NamedMethod suitable for JSON or YAML export.
func (m *NamedMethod) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Method StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export.
func (m *NamedParameter) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedResource suitable for JSON or YAML export.
func (m *NamedResource) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Resource StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export.
func (m *NamedSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedScope suitable for JSON or YAML export.
func (m *NamedScope) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Scope StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of Oauth2 suitable for JSON or YAML export.
func (m *Oauth2) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of Parameter suitable for JSON or YAML export.
func (m *Parameter) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Id != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("id"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Id))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Default != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Default))
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.Minimum != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Minimum))
}
if m.Maximum != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Maximum))
}
if len(m.Enum) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Enum))
}
if len(m.EnumDescriptions) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("enumDescriptions"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.EnumDescriptions))
}
if m.Repeated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("repeated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Repeated))
}
if m.Location != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("location"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Location))
}
if m.Properties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("properties"))
info.Content = append(info.Content, m.Properties.ToRawInfo())
}
if m.AdditionalProperties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("additionalProperties"))
info.Content = append(info.Content, m.AdditionalProperties.ToRawInfo())
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.Annotations != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("annotations"))
info.Content = append(info.Content, m.Annotations.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of Parameters suitable for JSON or YAML export.
func (m *Parameters) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Protocols suitable for JSON or YAML export.
func (m *Protocols) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Simple != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("simple"))
info.Content = append(info.Content, m.Simple.ToRawInfo())
}
if m.Resumable != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("resumable"))
info.Content = append(info.Content, m.Resumable.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of Request suitable for JSON or YAML export.
func (m *Request) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.ParameterName != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameterName"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.ParameterName))
}
return info
}
// ToRawInfo returns a description of Resource suitable for JSON or YAML export.
func (m *Resource) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Methods != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("methods"))
info.Content = append(info.Content, m.Methods.ToRawInfo())
}
if m.Resources != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("resources"))
info.Content = append(info.Content, m.Resources.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of Resources suitable for JSON or YAML export.
func (m *Resources) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Response suitable for JSON or YAML export.
func (m *Response) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
return info
}
// ToRawInfo returns a description of Resumable suitable for JSON or YAML export.
func (m *Resumable) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Multipart != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipart"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Multipart))
}
if m.Path != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("path"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Path))
}
return info
}
// ToRawInfo returns a description of Schema suitable for JSON or YAML export.
func (m *Schema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Id != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("id"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Id))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Default != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Default))
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.Minimum != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Minimum))
}
if m.Maximum != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Maximum))
}
if len(m.Enum) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Enum))
}
if len(m.EnumDescriptions) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("enumDescriptions"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.EnumDescriptions))
}
if m.Repeated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("repeated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Repeated))
}
if m.Location != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("location"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Location))
}
if m.Properties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("properties"))
info.Content = append(info.Content, m.Properties.ToRawInfo())
}
if m.AdditionalProperties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("additionalProperties"))
info.Content = append(info.Content, m.AdditionalProperties.ToRawInfo())
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.Annotations != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("annotations"))
info.Content = append(info.Content, m.Annotations.ToRawInfo())
}
if m.ReadOnly != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly))
}
return info
}
// ToRawInfo returns a description of Schemas suitable for JSON or YAML export.
func (m *Schemas) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Scope suitable for JSON or YAML export.
func (m *Scope) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
return info
}
// ToRawInfo returns a description of Scopes suitable for JSON or YAML export.
func (m *Scopes) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Simple suitable for JSON or YAML export.
func (m *Simple) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Multipart != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipart"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Multipart))
}
if m.Path != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("path"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Path))
}
return info
}
// ToRawInfo returns a description of StringArray suitable for JSON or YAML export.
func (m *StringArray) ToRawInfo() *yaml.Node {
return compiler.NewSequenceNodeForStringArray(m.Value)
}
gnostic-models-0.6.8/discovery/discovery.pb.go 0000664 0000000 0000000 00000303015 14225377162 0021434 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: discovery/discovery.proto
package discovery_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
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)
)
type Annotations struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Required []string `protobuf:"bytes,1,rep,name=required,proto3" json:"required,omitempty"`
}
func (x *Annotations) Reset() {
*x = Annotations{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Annotations) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Annotations) ProtoMessage() {}
func (x *Annotations) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 Annotations.ProtoReflect.Descriptor instead.
func (*Annotations) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{0}
}
func (x *Annotations) GetRequired() []string {
if x != nil {
return x.Required
}
return nil
}
type Any struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *anypb.Any `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"`
}
func (x *Any) Reset() {
*x = Any{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Any) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Any) ProtoMessage() {}
func (x *Any) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 Any.ProtoReflect.Descriptor instead.
func (*Any) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{1}
}
func (x *Any) GetValue() *anypb.Any {
if x != nil {
return x.Value
}
return nil
}
func (x *Any) GetYaml() string {
if x != nil {
return x.Yaml
}
return ""
}
type Auth struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Oauth2 *Oauth2 `protobuf:"bytes,1,opt,name=oauth2,proto3" json:"oauth2,omitempty"`
}
func (x *Auth) Reset() {
*x = Auth{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Auth) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Auth) ProtoMessage() {}
func (x *Auth) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 Auth.ProtoReflect.Descriptor instead.
func (*Auth) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{2}
}
func (x *Auth) GetOauth2() *Oauth2 {
if x != nil {
return x.Oauth2
}
return nil
}
type Document struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
DiscoveryVersion string `protobuf:"bytes,2,opt,name=discovery_version,json=discoveryVersion,proto3" json:"discovery_version,omitempty"`
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
Revision string `protobuf:"bytes,6,opt,name=revision,proto3" json:"revision,omitempty"`
Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
Icons *Icons `protobuf:"bytes,9,opt,name=icons,proto3" json:"icons,omitempty"`
DocumentationLink string `protobuf:"bytes,10,opt,name=documentation_link,json=documentationLink,proto3" json:"documentation_link,omitempty"`
Labels []string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty"`
Protocol string `protobuf:"bytes,12,opt,name=protocol,proto3" json:"protocol,omitempty"`
BaseUrl string `protobuf:"bytes,13,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
BasePath string `protobuf:"bytes,14,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"`
RootUrl string `protobuf:"bytes,15,opt,name=root_url,json=rootUrl,proto3" json:"root_url,omitempty"`
ServicePath string `protobuf:"bytes,16,opt,name=service_path,json=servicePath,proto3" json:"service_path,omitempty"`
BatchPath string `protobuf:"bytes,17,opt,name=batch_path,json=batchPath,proto3" json:"batch_path,omitempty"`
Parameters *Parameters `protobuf:"bytes,18,opt,name=parameters,proto3" json:"parameters,omitempty"`
Auth *Auth `protobuf:"bytes,19,opt,name=auth,proto3" json:"auth,omitempty"`
Features []string `protobuf:"bytes,20,rep,name=features,proto3" json:"features,omitempty"`
Schemas *Schemas `protobuf:"bytes,21,opt,name=schemas,proto3" json:"schemas,omitempty"`
Methods *Methods `protobuf:"bytes,22,opt,name=methods,proto3" json:"methods,omitempty"`
Resources *Resources `protobuf:"bytes,23,opt,name=resources,proto3" json:"resources,omitempty"`
Etag string `protobuf:"bytes,24,opt,name=etag,proto3" json:"etag,omitempty"`
OwnerDomain string `protobuf:"bytes,25,opt,name=owner_domain,json=ownerDomain,proto3" json:"owner_domain,omitempty"`
OwnerName string `protobuf:"bytes,26,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
VersionModule bool `protobuf:"varint,27,opt,name=version_module,json=versionModule,proto3" json:"version_module,omitempty"`
CanonicalName string `protobuf:"bytes,28,opt,name=canonical_name,json=canonicalName,proto3" json:"canonical_name,omitempty"`
FullyEncodeReservedExpansion bool `protobuf:"varint,29,opt,name=fully_encode_reserved_expansion,json=fullyEncodeReservedExpansion,proto3" json:"fully_encode_reserved_expansion,omitempty"`
PackagePath string `protobuf:"bytes,30,opt,name=package_path,json=packagePath,proto3" json:"package_path,omitempty"`
MtlsRootUrl string `protobuf:"bytes,31,opt,name=mtls_root_url,json=mtlsRootUrl,proto3" json:"mtls_root_url,omitempty"`
}
func (x *Document) Reset() {
*x = Document{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Document) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Document) ProtoMessage() {}
func (x *Document) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 Document.ProtoReflect.Descriptor instead.
func (*Document) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{3}
}
func (x *Document) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *Document) GetDiscoveryVersion() string {
if x != nil {
return x.DiscoveryVersion
}
return ""
}
func (x *Document) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Document) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Document) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Document) GetRevision() string {
if x != nil {
return x.Revision
}
return ""
}
func (x *Document) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Document) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Document) GetIcons() *Icons {
if x != nil {
return x.Icons
}
return nil
}
func (x *Document) GetDocumentationLink() string {
if x != nil {
return x.DocumentationLink
}
return ""
}
func (x *Document) GetLabels() []string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Document) GetProtocol() string {
if x != nil {
return x.Protocol
}
return ""
}
func (x *Document) GetBaseUrl() string {
if x != nil {
return x.BaseUrl
}
return ""
}
func (x *Document) GetBasePath() string {
if x != nil {
return x.BasePath
}
return ""
}
func (x *Document) GetRootUrl() string {
if x != nil {
return x.RootUrl
}
return ""
}
func (x *Document) GetServicePath() string {
if x != nil {
return x.ServicePath
}
return ""
}
func (x *Document) GetBatchPath() string {
if x != nil {
return x.BatchPath
}
return ""
}
func (x *Document) GetParameters() *Parameters {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Document) GetAuth() *Auth {
if x != nil {
return x.Auth
}
return nil
}
func (x *Document) GetFeatures() []string {
if x != nil {
return x.Features
}
return nil
}
func (x *Document) GetSchemas() *Schemas {
if x != nil {
return x.Schemas
}
return nil
}
func (x *Document) GetMethods() *Methods {
if x != nil {
return x.Methods
}
return nil
}
func (x *Document) GetResources() *Resources {
if x != nil {
return x.Resources
}
return nil
}
func (x *Document) GetEtag() string {
if x != nil {
return x.Etag
}
return ""
}
func (x *Document) GetOwnerDomain() string {
if x != nil {
return x.OwnerDomain
}
return ""
}
func (x *Document) GetOwnerName() string {
if x != nil {
return x.OwnerName
}
return ""
}
func (x *Document) GetVersionModule() bool {
if x != nil {
return x.VersionModule
}
return false
}
func (x *Document) GetCanonicalName() string {
if x != nil {
return x.CanonicalName
}
return ""
}
func (x *Document) GetFullyEncodeReservedExpansion() bool {
if x != nil {
return x.FullyEncodeReservedExpansion
}
return false
}
func (x *Document) GetPackagePath() string {
if x != nil {
return x.PackagePath
}
return ""
}
func (x *Document) GetMtlsRootUrl() string {
if x != nil {
return x.MtlsRootUrl
}
return ""
}
// Icons that represent the API.
type Icons struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
X16 string `protobuf:"bytes,1,opt,name=x16,proto3" json:"x16,omitempty"`
X32 string `protobuf:"bytes,2,opt,name=x32,proto3" json:"x32,omitempty"`
}
func (x *Icons) Reset() {
*x = Icons{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Icons) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Icons) ProtoMessage() {}
func (x *Icons) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 Icons.ProtoReflect.Descriptor instead.
func (*Icons) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{4}
}
func (x *Icons) GetX16() string {
if x != nil {
return x.X16
}
return ""
}
func (x *Icons) GetX32() string {
if x != nil {
return x.X32
}
return ""
}
type MediaUpload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Accept []string `protobuf:"bytes,1,rep,name=accept,proto3" json:"accept,omitempty"`
MaxSize string `protobuf:"bytes,2,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
Protocols *Protocols `protobuf:"bytes,3,opt,name=protocols,proto3" json:"protocols,omitempty"`
SupportsSubscription bool `protobuf:"varint,4,opt,name=supports_subscription,json=supportsSubscription,proto3" json:"supports_subscription,omitempty"`
}
func (x *MediaUpload) Reset() {
*x = MediaUpload{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaUpload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaUpload) ProtoMessage() {}
func (x *MediaUpload) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[5]
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 MediaUpload.ProtoReflect.Descriptor instead.
func (*MediaUpload) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{5}
}
func (x *MediaUpload) GetAccept() []string {
if x != nil {
return x.Accept
}
return nil
}
func (x *MediaUpload) GetMaxSize() string {
if x != nil {
return x.MaxSize
}
return ""
}
func (x *MediaUpload) GetProtocols() *Protocols {
if x != nil {
return x.Protocols
}
return nil
}
func (x *MediaUpload) GetSupportsSubscription() bool {
if x != nil {
return x.SupportsSubscription
}
return false
}
type Method struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
HttpMethod string `protobuf:"bytes,3,opt,name=http_method,json=httpMethod,proto3" json:"http_method,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Parameters *Parameters `protobuf:"bytes,5,opt,name=parameters,proto3" json:"parameters,omitempty"`
ParameterOrder []string `protobuf:"bytes,6,rep,name=parameter_order,json=parameterOrder,proto3" json:"parameter_order,omitempty"`
Request *Request `protobuf:"bytes,7,opt,name=request,proto3" json:"request,omitempty"`
Response *Response `protobuf:"bytes,8,opt,name=response,proto3" json:"response,omitempty"`
Scopes []string `protobuf:"bytes,9,rep,name=scopes,proto3" json:"scopes,omitempty"`
SupportsMediaDownload bool `protobuf:"varint,10,opt,name=supports_media_download,json=supportsMediaDownload,proto3" json:"supports_media_download,omitempty"`
SupportsMediaUpload bool `protobuf:"varint,11,opt,name=supports_media_upload,json=supportsMediaUpload,proto3" json:"supports_media_upload,omitempty"`
UseMediaDownloadService bool `protobuf:"varint,12,opt,name=use_media_download_service,json=useMediaDownloadService,proto3" json:"use_media_download_service,omitempty"`
MediaUpload *MediaUpload `protobuf:"bytes,13,opt,name=media_upload,json=mediaUpload,proto3" json:"media_upload,omitempty"`
SupportsSubscription bool `protobuf:"varint,14,opt,name=supports_subscription,json=supportsSubscription,proto3" json:"supports_subscription,omitempty"`
FlatPath string `protobuf:"bytes,15,opt,name=flat_path,json=flatPath,proto3" json:"flat_path,omitempty"`
EtagRequired bool `protobuf:"varint,16,opt,name=etag_required,json=etagRequired,proto3" json:"etag_required,omitempty"`
StreamingType string `protobuf:"bytes,17,opt,name=streaming_type,json=streamingType,proto3" json:"streaming_type,omitempty"`
}
func (x *Method) Reset() {
*x = Method{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Method) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Method) ProtoMessage() {}
func (x *Method) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[6]
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 Method.ProtoReflect.Descriptor instead.
func (*Method) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{6}
}
func (x *Method) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Method) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *Method) GetHttpMethod() string {
if x != nil {
return x.HttpMethod
}
return ""
}
func (x *Method) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Method) GetParameters() *Parameters {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Method) GetParameterOrder() []string {
if x != nil {
return x.ParameterOrder
}
return nil
}
func (x *Method) GetRequest() *Request {
if x != nil {
return x.Request
}
return nil
}
func (x *Method) GetResponse() *Response {
if x != nil {
return x.Response
}
return nil
}
func (x *Method) GetScopes() []string {
if x != nil {
return x.Scopes
}
return nil
}
func (x *Method) GetSupportsMediaDownload() bool {
if x != nil {
return x.SupportsMediaDownload
}
return false
}
func (x *Method) GetSupportsMediaUpload() bool {
if x != nil {
return x.SupportsMediaUpload
}
return false
}
func (x *Method) GetUseMediaDownloadService() bool {
if x != nil {
return x.UseMediaDownloadService
}
return false
}
func (x *Method) GetMediaUpload() *MediaUpload {
if x != nil {
return x.MediaUpload
}
return nil
}
func (x *Method) GetSupportsSubscription() bool {
if x != nil {
return x.SupportsSubscription
}
return false
}
func (x *Method) GetFlatPath() string {
if x != nil {
return x.FlatPath
}
return ""
}
func (x *Method) GetEtagRequired() bool {
if x != nil {
return x.EtagRequired
}
return false
}
func (x *Method) GetStreamingType() string {
if x != nil {
return x.StreamingType
}
return ""
}
type Methods struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedMethod `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Methods) Reset() {
*x = Methods{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Methods) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Methods) ProtoMessage() {}
func (x *Methods) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[7]
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 Methods.ProtoReflect.Descriptor instead.
func (*Methods) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{7}
}
func (x *Methods) GetAdditionalProperties() []*NamedMethod {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs.
type NamedMethod struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Method `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedMethod) Reset() {
*x = NamedMethod{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedMethod) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedMethod) ProtoMessage() {}
func (x *NamedMethod) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[8]
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 NamedMethod.ProtoReflect.Descriptor instead.
func (*NamedMethod) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{8}
}
func (x *NamedMethod) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedMethod) GetValue() *Method {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
type NamedParameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Parameter `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedParameter) Reset() {
*x = NamedParameter{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedParameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedParameter) ProtoMessage() {}
func (x *NamedParameter) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_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 NamedParameter.ProtoReflect.Descriptor instead.
func (*NamedParameter) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{9}
}
func (x *NamedParameter) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedParameter) GetValue() *Parameter {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs.
type NamedResource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Resource `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedResource) Reset() {
*x = NamedResource{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedResource) ProtoMessage() {}
func (x *NamedResource) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[10]
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 NamedResource.ProtoReflect.Descriptor instead.
func (*NamedResource) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{10}
}
func (x *NamedResource) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedResource) GetValue() *Resource {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
type NamedSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Schema `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedSchema) Reset() {
*x = NamedSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedSchema) ProtoMessage() {}
func (x *NamedSchema) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[11]
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 NamedSchema.ProtoReflect.Descriptor instead.
func (*NamedSchema) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{11}
}
func (x *NamedSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedSchema) GetValue() *Schema {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs.
type NamedScope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Scope `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedScope) Reset() {
*x = NamedScope{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedScope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedScope) ProtoMessage() {}
func (x *NamedScope) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[12]
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 NamedScope.ProtoReflect.Descriptor instead.
func (*NamedScope) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{12}
}
func (x *NamedScope) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedScope) GetValue() *Scope {
if x != nil {
return x.Value
}
return nil
}
type Oauth2 struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Scopes *Scopes `protobuf:"bytes,1,opt,name=scopes,proto3" json:"scopes,omitempty"`
}
func (x *Oauth2) Reset() {
*x = Oauth2{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2) ProtoMessage() {}
func (x *Oauth2) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[13]
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 Oauth2.ProtoReflect.Descriptor instead.
func (*Oauth2) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{13}
}
func (x *Oauth2) GetScopes() *Scopes {
if x != nil {
return x.Scopes
}
return nil
}
type Parameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
XRef string `protobuf:"bytes,3,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Default string `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"`
Required bool `protobuf:"varint,6,opt,name=required,proto3" json:"required,omitempty"`
Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"`
Pattern string `protobuf:"bytes,8,opt,name=pattern,proto3" json:"pattern,omitempty"`
Minimum string `protobuf:"bytes,9,opt,name=minimum,proto3" json:"minimum,omitempty"`
Maximum string `protobuf:"bytes,10,opt,name=maximum,proto3" json:"maximum,omitempty"`
Enum []string `protobuf:"bytes,11,rep,name=enum,proto3" json:"enum,omitempty"`
EnumDescriptions []string `protobuf:"bytes,12,rep,name=enum_descriptions,json=enumDescriptions,proto3" json:"enum_descriptions,omitempty"`
Repeated bool `protobuf:"varint,13,opt,name=repeated,proto3" json:"repeated,omitempty"`
Location string `protobuf:"bytes,14,opt,name=location,proto3" json:"location,omitempty"`
Properties *Schemas `protobuf:"bytes,15,opt,name=properties,proto3" json:"properties,omitempty"`
AdditionalProperties *Schema `protobuf:"bytes,16,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
Items *Schema `protobuf:"bytes,17,opt,name=items,proto3" json:"items,omitempty"`
Annotations *Annotations `protobuf:"bytes,18,opt,name=annotations,proto3" json:"annotations,omitempty"`
}
func (x *Parameter) Reset() {
*x = Parameter{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Parameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Parameter) ProtoMessage() {}
func (x *Parameter) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[14]
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 Parameter.ProtoReflect.Descriptor instead.
func (*Parameter) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{14}
}
func (x *Parameter) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Parameter) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Parameter) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *Parameter) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Parameter) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
func (x *Parameter) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *Parameter) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Parameter) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *Parameter) GetMinimum() string {
if x != nil {
return x.Minimum
}
return ""
}
func (x *Parameter) GetMaximum() string {
if x != nil {
return x.Maximum
}
return ""
}
func (x *Parameter) GetEnum() []string {
if x != nil {
return x.Enum
}
return nil
}
func (x *Parameter) GetEnumDescriptions() []string {
if x != nil {
return x.EnumDescriptions
}
return nil
}
func (x *Parameter) GetRepeated() bool {
if x != nil {
return x.Repeated
}
return false
}
func (x *Parameter) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *Parameter) GetProperties() *Schemas {
if x != nil {
return x.Properties
}
return nil
}
func (x *Parameter) GetAdditionalProperties() *Schema {
if x != nil {
return x.AdditionalProperties
}
return nil
}
func (x *Parameter) GetItems() *Schema {
if x != nil {
return x.Items
}
return nil
}
func (x *Parameter) GetAnnotations() *Annotations {
if x != nil {
return x.Annotations
}
return nil
}
type Parameters struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Parameters) Reset() {
*x = Parameters{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Parameters) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Parameters) ProtoMessage() {}
func (x *Parameters) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[15]
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 Parameters.ProtoReflect.Descriptor instead.
func (*Parameters) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{15}
}
func (x *Parameters) GetAdditionalProperties() []*NamedParameter {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Protocols struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Simple *Simple `protobuf:"bytes,1,opt,name=simple,proto3" json:"simple,omitempty"`
Resumable *Resumable `protobuf:"bytes,2,opt,name=resumable,proto3" json:"resumable,omitempty"`
}
func (x *Protocols) Reset() {
*x = Protocols{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Protocols) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Protocols) ProtoMessage() {}
func (x *Protocols) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[16]
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 Protocols.ProtoReflect.Descriptor instead.
func (*Protocols) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{16}
}
func (x *Protocols) GetSimple() *Simple {
if x != nil {
return x.Simple
}
return nil
}
func (x *Protocols) GetResumable() *Resumable {
if x != nil {
return x.Resumable
}
return nil
}
type Request struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
ParameterName string `protobuf:"bytes,2,opt,name=parameter_name,json=parameterName,proto3" json:"parameter_name,omitempty"`
}
func (x *Request) Reset() {
*x = Request{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Request) ProtoMessage() {}
func (x *Request) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[17]
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 Request.ProtoReflect.Descriptor instead.
func (*Request) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{17}
}
func (x *Request) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *Request) GetParameterName() string {
if x != nil {
return x.ParameterName
}
return ""
}
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Methods *Methods `protobuf:"bytes,1,opt,name=methods,proto3" json:"methods,omitempty"`
Resources *Resources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"`
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[18]
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 Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{18}
}
func (x *Resource) GetMethods() *Methods {
if x != nil {
return x.Methods
}
return nil
}
func (x *Resource) GetResources() *Resources {
if x != nil {
return x.Resources
}
return nil
}
type Resources struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedResource `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Resources) Reset() {
*x = Resources{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resources) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resources) ProtoMessage() {}
func (x *Resources) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[19]
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 Resources.ProtoReflect.Descriptor instead.
func (*Resources) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{19}
}
func (x *Resources) GetAdditionalProperties() []*NamedResource {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[20]
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 Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{20}
}
func (x *Response) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
type Resumable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Multipart bool `protobuf:"varint,1,opt,name=multipart,proto3" json:"multipart,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}
func (x *Resumable) Reset() {
*x = Resumable{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resumable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resumable) ProtoMessage() {}
func (x *Resumable) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[21]
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 Resumable.ProtoReflect.Descriptor instead.
func (*Resumable) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{21}
}
func (x *Resumable) GetMultipart() bool {
if x != nil {
return x.Multipart
}
return false
}
func (x *Resumable) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type Schema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Default string `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"`
Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"`
Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"`
Pattern string `protobuf:"bytes,7,opt,name=pattern,proto3" json:"pattern,omitempty"`
Minimum string `protobuf:"bytes,8,opt,name=minimum,proto3" json:"minimum,omitempty"`
Maximum string `protobuf:"bytes,9,opt,name=maximum,proto3" json:"maximum,omitempty"`
Enum []string `protobuf:"bytes,10,rep,name=enum,proto3" json:"enum,omitempty"`
EnumDescriptions []string `protobuf:"bytes,11,rep,name=enum_descriptions,json=enumDescriptions,proto3" json:"enum_descriptions,omitempty"`
Repeated bool `protobuf:"varint,12,opt,name=repeated,proto3" json:"repeated,omitempty"`
Location string `protobuf:"bytes,13,opt,name=location,proto3" json:"location,omitempty"`
Properties *Schemas `protobuf:"bytes,14,opt,name=properties,proto3" json:"properties,omitempty"`
AdditionalProperties *Schema `protobuf:"bytes,15,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
Items *Schema `protobuf:"bytes,16,opt,name=items,proto3" json:"items,omitempty"`
XRef string `protobuf:"bytes,17,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Annotations *Annotations `protobuf:"bytes,18,opt,name=annotations,proto3" json:"annotations,omitempty"`
ReadOnly bool `protobuf:"varint,19,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
}
func (x *Schema) Reset() {
*x = Schema{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Schema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[22]
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 Schema.ProtoReflect.Descriptor instead.
func (*Schema) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{22}
}
func (x *Schema) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Schema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Schema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Schema) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
func (x *Schema) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *Schema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Schema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *Schema) GetMinimum() string {
if x != nil {
return x.Minimum
}
return ""
}
func (x *Schema) GetMaximum() string {
if x != nil {
return x.Maximum
}
return ""
}
func (x *Schema) GetEnum() []string {
if x != nil {
return x.Enum
}
return nil
}
func (x *Schema) GetEnumDescriptions() []string {
if x != nil {
return x.EnumDescriptions
}
return nil
}
func (x *Schema) GetRepeated() bool {
if x != nil {
return x.Repeated
}
return false
}
func (x *Schema) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *Schema) GetProperties() *Schemas {
if x != nil {
return x.Properties
}
return nil
}
func (x *Schema) GetAdditionalProperties() *Schema {
if x != nil {
return x.AdditionalProperties
}
return nil
}
func (x *Schema) GetItems() *Schema {
if x != nil {
return x.Items
}
return nil
}
func (x *Schema) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *Schema) GetAnnotations() *Annotations {
if x != nil {
return x.Annotations
}
return nil
}
func (x *Schema) GetReadOnly() bool {
if x != nil {
return x.ReadOnly
}
return false
}
type Schemas struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Schemas) Reset() {
*x = Schemas{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Schemas) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Schemas) ProtoMessage() {}
func (x *Schemas) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[23]
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 Schemas.ProtoReflect.Descriptor instead.
func (*Schemas) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{23}
}
func (x *Schemas) GetAdditionalProperties() []*NamedSchema {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Scope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *Scope) Reset() {
*x = Scope{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Scope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Scope) ProtoMessage() {}
func (x *Scope) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[24]
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 Scope.ProtoReflect.Descriptor instead.
func (*Scope) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{24}
}
func (x *Scope) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type Scopes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedScope `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Scopes) Reset() {
*x = Scopes{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Scopes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Scopes) ProtoMessage() {}
func (x *Scopes) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[25]
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 Scopes.ProtoReflect.Descriptor instead.
func (*Scopes) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{25}
}
func (x *Scopes) GetAdditionalProperties() []*NamedScope {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Simple struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Multipart bool `protobuf:"varint,1,opt,name=multipart,proto3" json:"multipart,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}
func (x *Simple) Reset() {
*x = Simple{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Simple) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Simple) ProtoMessage() {}
func (x *Simple) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[26]
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 Simple.ProtoReflect.Descriptor instead.
func (*Simple) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{26}
}
func (x *Simple) GetMultipart() bool {
if x != nil {
return x.Multipart
}
return false
}
func (x *Simple) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type StringArray struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
func (x *StringArray) Reset() {
*x = StringArray{}
if protoimpl.UnsafeEnabled {
mi := &file_discovery_discovery_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringArray) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringArray) ProtoMessage() {}
func (x *StringArray) ProtoReflect() protoreflect.Message {
mi := &file_discovery_discovery_proto_msgTypes[27]
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 StringArray.ProtoReflect.Descriptor instead.
func (*StringArray) Descriptor() ([]byte, []int) {
return file_discovery_discovery_proto_rawDescGZIP(), []int{27}
}
func (x *StringArray) GetValue() []string {
if x != nil {
return x.Value
}
return nil
}
var File_discovery_discovery_proto protoreflect.FileDescriptor
var file_discovery_discovery_proto_rawDesc = []byte{
0x0a, 0x19, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x64, 0x69, 0x73, 0x63,
0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22,
0x45, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x22, 0x34, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x2c,
0x0a, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x61,
0x75, 0x74, 0x68, 0x32, 0x52, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x22, 0xc9, 0x08, 0x0a,
0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x2b, 0x0a,
0x11, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18,
0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x05,
0x69, 0x63, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x63, 0x6f, 0x6e, 0x73,
0x52, 0x05, 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x6f, 0x63, 0x75, 0x6d,
0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61,
0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61,
0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61,
0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61,
0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a,
0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x10, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68,
0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x11,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x74, 0x68, 0x12,
0x38, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x12, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x61, 0x75, 0x74,
0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74,
0x68, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20,
0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x2f, 0x0a,
0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x2f,
0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12,
0x35, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76,
0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x18,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x77,
0x6e, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a,
0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x1b,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, 0x6e,
0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75,
0x6c, 0x6c, 0x79, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72,
0x76, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1d, 0x20,
0x01, 0x28, 0x08, 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65,
0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74,
0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
0x50, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x74, 0x6c, 0x73, 0x5f, 0x72, 0x6f, 0x6f,
0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x74, 0x6c,
0x73, 0x52, 0x6f, 0x6f, 0x74, 0x55, 0x72, 0x6c, 0x22, 0x2b, 0x0a, 0x05, 0x49, 0x63, 0x6f, 0x6e,
0x73, 0x12, 0x10, 0x0a, 0x03, 0x78, 0x31, 0x36, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x78, 0x31, 0x36, 0x12, 0x10, 0x0a, 0x03, 0x78, 0x33, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x78, 0x33, 0x32, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55,
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x19, 0x0a,
0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x73, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12,
0x33, 0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14,
0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd4, 0x05, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x07, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64,
0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
0x74, 0x73, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32,
0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61,
0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x70, 0x6c, 0x6f,
0x61, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f,
0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x75, 0x73, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x3c, 0x0a, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18,
0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
0x52, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x33, 0x0a,
0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x75,
0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18,
0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12,
0x23, 0x0a, 0x0d, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x74, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,
0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a, 0x07, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x4d, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f,
0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x0d, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a,
0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x0a,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f,
0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x06, 0x4f, 0x61, 0x75,
0x74, 0x68, 0x32, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65,
0x73, 0x22, 0xe4, 0x04, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72,
0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78,
0x69, 0x6d, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x03,
0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20,
0x03, 0x28, 0x09, 0x52, 0x10, 0x65, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a,
0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31,
0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
0x74, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x10, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12,
0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e,
0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5f, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x09, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65,
0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x69,
0x6d, 0x70, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65,
0x52, 0x09, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x43, 0x0a, 0x07, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
0x22, 0x72, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x35, 0x0a,
0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x73, 0x12, 0x50, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x14, 0x61,
0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
0x69, 0x65, 0x73, 0x22, 0x1d, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x52,
0x65, 0x66, 0x22, 0x3d, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
0x68, 0x22, 0xfe, 0x04, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 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, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69,
0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x6e,
0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x12,
0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65,
0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x49,
0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f,
0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x11, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e,
0x6c, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e,
0x6c, 0x79, 0x22, 0x59, 0x0a, 0x07, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x4e, 0x0a,
0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64,
0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x29, 0x0a,
0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70,
0x65, 0x73, 0x12, 0x4d, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
0x73, 0x22, 0x3a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x23, 0x0a,
0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x42, 0x42, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x5f, 0x76, 0x31, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x2e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
0x65, 0x72, 0x79, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x76, 0x31,
0xa2, 0x02, 0x03, 0x4f, 0x41, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_discovery_discovery_proto_rawDescOnce sync.Once
file_discovery_discovery_proto_rawDescData = file_discovery_discovery_proto_rawDesc
)
func file_discovery_discovery_proto_rawDescGZIP() []byte {
file_discovery_discovery_proto_rawDescOnce.Do(func() {
file_discovery_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_discovery_discovery_proto_rawDescData)
})
return file_discovery_discovery_proto_rawDescData
}
var file_discovery_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
var file_discovery_discovery_proto_goTypes = []interface{}{
(*Annotations)(nil), // 0: discovery.v1.Annotations
(*Any)(nil), // 1: discovery.v1.Any
(*Auth)(nil), // 2: discovery.v1.Auth
(*Document)(nil), // 3: discovery.v1.Document
(*Icons)(nil), // 4: discovery.v1.Icons
(*MediaUpload)(nil), // 5: discovery.v1.MediaUpload
(*Method)(nil), // 6: discovery.v1.Method
(*Methods)(nil), // 7: discovery.v1.Methods
(*NamedMethod)(nil), // 8: discovery.v1.NamedMethod
(*NamedParameter)(nil), // 9: discovery.v1.NamedParameter
(*NamedResource)(nil), // 10: discovery.v1.NamedResource
(*NamedSchema)(nil), // 11: discovery.v1.NamedSchema
(*NamedScope)(nil), // 12: discovery.v1.NamedScope
(*Oauth2)(nil), // 13: discovery.v1.Oauth2
(*Parameter)(nil), // 14: discovery.v1.Parameter
(*Parameters)(nil), // 15: discovery.v1.Parameters
(*Protocols)(nil), // 16: discovery.v1.Protocols
(*Request)(nil), // 17: discovery.v1.Request
(*Resource)(nil), // 18: discovery.v1.Resource
(*Resources)(nil), // 19: discovery.v1.Resources
(*Response)(nil), // 20: discovery.v1.Response
(*Resumable)(nil), // 21: discovery.v1.Resumable
(*Schema)(nil), // 22: discovery.v1.Schema
(*Schemas)(nil), // 23: discovery.v1.Schemas
(*Scope)(nil), // 24: discovery.v1.Scope
(*Scopes)(nil), // 25: discovery.v1.Scopes
(*Simple)(nil), // 26: discovery.v1.Simple
(*StringArray)(nil), // 27: discovery.v1.StringArray
(*anypb.Any)(nil), // 28: google.protobuf.Any
}
var file_discovery_discovery_proto_depIdxs = []int32{
28, // 0: discovery.v1.Any.value:type_name -> google.protobuf.Any
13, // 1: discovery.v1.Auth.oauth2:type_name -> discovery.v1.Oauth2
4, // 2: discovery.v1.Document.icons:type_name -> discovery.v1.Icons
15, // 3: discovery.v1.Document.parameters:type_name -> discovery.v1.Parameters
2, // 4: discovery.v1.Document.auth:type_name -> discovery.v1.Auth
23, // 5: discovery.v1.Document.schemas:type_name -> discovery.v1.Schemas
7, // 6: discovery.v1.Document.methods:type_name -> discovery.v1.Methods
19, // 7: discovery.v1.Document.resources:type_name -> discovery.v1.Resources
16, // 8: discovery.v1.MediaUpload.protocols:type_name -> discovery.v1.Protocols
15, // 9: discovery.v1.Method.parameters:type_name -> discovery.v1.Parameters
17, // 10: discovery.v1.Method.request:type_name -> discovery.v1.Request
20, // 11: discovery.v1.Method.response:type_name -> discovery.v1.Response
5, // 12: discovery.v1.Method.media_upload:type_name -> discovery.v1.MediaUpload
8, // 13: discovery.v1.Methods.additional_properties:type_name -> discovery.v1.NamedMethod
6, // 14: discovery.v1.NamedMethod.value:type_name -> discovery.v1.Method
14, // 15: discovery.v1.NamedParameter.value:type_name -> discovery.v1.Parameter
18, // 16: discovery.v1.NamedResource.value:type_name -> discovery.v1.Resource
22, // 17: discovery.v1.NamedSchema.value:type_name -> discovery.v1.Schema
24, // 18: discovery.v1.NamedScope.value:type_name -> discovery.v1.Scope
25, // 19: discovery.v1.Oauth2.scopes:type_name -> discovery.v1.Scopes
23, // 20: discovery.v1.Parameter.properties:type_name -> discovery.v1.Schemas
22, // 21: discovery.v1.Parameter.additional_properties:type_name -> discovery.v1.Schema
22, // 22: discovery.v1.Parameter.items:type_name -> discovery.v1.Schema
0, // 23: discovery.v1.Parameter.annotations:type_name -> discovery.v1.Annotations
9, // 24: discovery.v1.Parameters.additional_properties:type_name -> discovery.v1.NamedParameter
26, // 25: discovery.v1.Protocols.simple:type_name -> discovery.v1.Simple
21, // 26: discovery.v1.Protocols.resumable:type_name -> discovery.v1.Resumable
7, // 27: discovery.v1.Resource.methods:type_name -> discovery.v1.Methods
19, // 28: discovery.v1.Resource.resources:type_name -> discovery.v1.Resources
10, // 29: discovery.v1.Resources.additional_properties:type_name -> discovery.v1.NamedResource
23, // 30: discovery.v1.Schema.properties:type_name -> discovery.v1.Schemas
22, // 31: discovery.v1.Schema.additional_properties:type_name -> discovery.v1.Schema
22, // 32: discovery.v1.Schema.items:type_name -> discovery.v1.Schema
0, // 33: discovery.v1.Schema.annotations:type_name -> discovery.v1.Annotations
11, // 34: discovery.v1.Schemas.additional_properties:type_name -> discovery.v1.NamedSchema
12, // 35: discovery.v1.Scopes.additional_properties:type_name -> discovery.v1.NamedScope
36, // [36:36] is the sub-list for method output_type
36, // [36:36] is the sub-list for method input_type
36, // [36:36] is the sub-list for extension type_name
36, // [36:36] is the sub-list for extension extendee
0, // [0:36] is the sub-list for field type_name
}
func init() { file_discovery_discovery_proto_init() }
func file_discovery_discovery_proto_init() {
if File_discovery_discovery_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_discovery_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Annotations); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Any); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Auth); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Document); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Icons); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaUpload); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Method); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Methods); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedMethod); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedParameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedResource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedScope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Parameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Parameters); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Protocols); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Request); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resources); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resumable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Schema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Schemas); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Scope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Scopes); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Simple); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discovery_discovery_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StringArray); 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_discovery_discovery_proto_rawDesc,
NumEnums: 0,
NumMessages: 28,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_discovery_discovery_proto_goTypes,
DependencyIndexes: file_discovery_discovery_proto_depIdxs,
MessageInfos: file_discovery_discovery_proto_msgTypes,
}.Build()
File_discovery_discovery_proto = out.File
file_discovery_discovery_proto_rawDesc = nil
file_discovery_discovery_proto_goTypes = nil
file_discovery_discovery_proto_depIdxs = nil
}
gnostic-models-0.6.8/discovery/discovery.proto 0000664 0000000 0000000 00000014470 14225377162 0021576 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package discovery.v1;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "org.discovery_v1";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
// The Go package name.
option go_package = "./discovery;discovery_v1";
message Annotations {
repeated string required = 1;
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message Auth {
Oauth2 oauth2 = 1;
}
message Document {
string kind = 1;
string discovery_version = 2;
string id = 3;
string name = 4;
string version = 5;
string revision = 6;
string title = 7;
string description = 8;
Icons icons = 9;
string documentation_link = 10;
repeated string labels = 11;
string protocol = 12;
string base_url = 13;
string base_path = 14;
string root_url = 15;
string service_path = 16;
string batch_path = 17;
Parameters parameters = 18;
Auth auth = 19;
repeated string features = 20;
Schemas schemas = 21;
Methods methods = 22;
Resources resources = 23;
string etag = 24;
string owner_domain = 25;
string owner_name = 26;
bool version_module = 27;
string canonical_name = 28;
bool fully_encode_reserved_expansion = 29;
string package_path = 30;
string mtls_root_url = 31;
}
// Icons that represent the API.
message Icons {
string x16 = 1;
string x32 = 2;
}
message MediaUpload {
repeated string accept = 1;
string max_size = 2;
Protocols protocols = 3;
bool supports_subscription = 4;
}
message Method {
string id = 1;
string path = 2;
string http_method = 3;
string description = 4;
Parameters parameters = 5;
repeated string parameter_order = 6;
Request request = 7;
Response response = 8;
repeated string scopes = 9;
bool supports_media_download = 10;
bool supports_media_upload = 11;
bool use_media_download_service = 12;
MediaUpload media_upload = 13;
bool supports_subscription = 14;
string flat_path = 15;
bool etag_required = 16;
string streaming_type = 17;
}
message Methods {
repeated NamedMethod additional_properties = 1;
}
// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs.
message NamedMethod {
// Map key
string name = 1;
// Mapped value
Method value = 2;
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
message NamedParameter {
// Map key
string name = 1;
// Mapped value
Parameter value = 2;
}
// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs.
message NamedResource {
// Map key
string name = 1;
// Mapped value
Resource value = 2;
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
message NamedSchema {
// Map key
string name = 1;
// Mapped value
Schema value = 2;
}
// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs.
message NamedScope {
// Map key
string name = 1;
// Mapped value
Scope value = 2;
}
message Oauth2 {
Scopes scopes = 1;
}
message Parameter {
string id = 1;
string type = 2;
string _ref = 3;
string description = 4;
string default = 5;
bool required = 6;
string format = 7;
string pattern = 8;
string minimum = 9;
string maximum = 10;
repeated string enum = 11;
repeated string enum_descriptions = 12;
bool repeated = 13;
string location = 14;
Schemas properties = 15;
Schema additional_properties = 16;
Schema items = 17;
Annotations annotations = 18;
}
message Parameters {
repeated NamedParameter additional_properties = 1;
}
message Protocols {
Simple simple = 1;
Resumable resumable = 2;
}
message Request {
string _ref = 1;
string parameter_name = 2;
}
message Resource {
Methods methods = 1;
Resources resources = 2;
}
message Resources {
repeated NamedResource additional_properties = 1;
}
message Response {
string _ref = 1;
}
message Resumable {
bool multipart = 1;
string path = 2;
}
message Schema {
string id = 1;
string type = 2;
string description = 3;
string default = 4;
bool required = 5;
string format = 6;
string pattern = 7;
string minimum = 8;
string maximum = 9;
repeated string enum = 10;
repeated string enum_descriptions = 11;
bool repeated = 12;
string location = 13;
Schemas properties = 14;
Schema additional_properties = 15;
Schema items = 16;
string _ref = 17;
Annotations annotations = 18;
bool read_only = 19;
}
message Schemas {
repeated NamedSchema additional_properties = 1;
}
message Scope {
string description = 1;
}
message Scopes {
repeated NamedScope additional_properties = 1;
}
message Simple {
bool multipart = 1;
string path = 2;
}
message StringArray {
repeated string value = 1;
}
gnostic-models-0.6.8/discovery/document.go 0000664 0000000 0000000 00000002235 14225377162 0020643 0 ustar 00root root 0000000 0000000 // Copyright 2019 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.
package discovery_v1
import (
"github.com/google/gnostic-models/compiler"
)
// FetchDocumentBytes downloads the bytes of a discovery document from a URL.
func FetchDocumentBytes(documentURL string) ([]byte, error) {
return compiler.FetchFile(documentURL)
}
// ParseDocument reads a Discovery description from a YAML/JSON representation.
func ParseDocument(b []byte) (*Document, error) {
info, err := compiler.ReadInfoFromBytes("", b)
if err != nil {
return nil, err
}
root := info.Content[0]
return NewDocument(root, compiler.NewContext("$root", root, nil))
}
gnostic-models-0.6.8/discovery/list.go 0000664 0000000 0000000 00000006154 14225377162 0020004 0 ustar 00root root 0000000 0000000 // Copyright 2019 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.
package discovery_v1
import (
"encoding/json"
"errors"
"strings"
"github.com/google/gnostic-models/compiler"
)
// APIsListServiceURL is the URL for the Google APIs Discovery Service
const APIsListServiceURL = "https://www.googleapis.com/discovery/v1/apis"
// A List represents the results of a call to the apis/list API.
// https://developers.google.com/discovery/v1/reference/apis/list
type List struct {
Kind string `json:"kind"`
DiscoveryVersion string `json:"discoveryVersion"`
APIs []*API `json:"items"`
}
func FetchListBytes() ([]byte, error) {
return compiler.FetchFile(APIsListServiceURL)
}
// Read the list of APIs from the apis/list service.
func FetchList() (*List, error) {
bytes, err := FetchListBytes()
if err != nil {
return nil, err
}
return ParseList(bytes)
}
// ParseList unmarshals the bytes into a Document.
func ParseList(bytes []byte) (*List, error) {
var listResponse List
err := json.Unmarshal(bytes, &listResponse)
return &listResponse, err
}
// An API represents an API description returned by the apis/list API.
type API struct {
Kind string `json:"kind"`
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Title string `json:"title"`
Description string `json:"description"`
DiscoveryRestURL string `json:"discoveryRestUrl"`
DiscoveryLink string `json:"discoveryLink"`
Icons map[string]string `json:"icons"`
DocumentationLink string `json:"documentationLink"`
Labels []string `json:"labels"`
Preferred bool `json:"preferred"`
}
// APIWithNameAndVersion returns the API with a specified name and version.
// If version is the empty string, the API name must be unique.
func (a *List) APIWithNameAndVersion(name string, version string) (*API, error) {
var api *API // the API to return
versions := make([]string, 0) // the matching version names
// Scan the list for matching APIs and versions.
for _, item := range a.APIs {
if item.Name == name {
if version == "" || version == item.Version {
api = item
versions = append(versions, item.Version)
}
}
}
switch {
case len(versions) == 0:
return nil, errors.New(name + " was not found.")
case len(versions) > 1:
return nil, errors.New(name + " has multiple versions: " + strings.Join(versions, ", "))
default:
return api, nil
}
}
gnostic-models-0.6.8/extensions/ 0000775 0000000 0000000 00000000000 14225377162 0016664 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/extensions/README.md 0000664 0000000 0000000 00000000652 14225377162 0020146 0 ustar 00root root 0000000 0000000 # Extensions
**Extension Support is experimental.**
This directory contains support code for building Gnostic extensio handlers and
associated examples.
Extension handlers can be used to compile vendor or specification extensions
into protocol buffer structures.
Like plugins, extension handlers are built as separate executables. Extension
bodies are written to extension handlers as serialized
ExtensionHandlerRequests.
gnostic-models-0.6.8/extensions/extension.pb.go 0000664 0000000 0000000 00000037644 14225377162 0021645 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.27.1
// protoc v3.19.3
// source: extensions/extension.proto
package gnostic_extension_v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
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)
)
// The version number of Gnostic.
type Version struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
// be empty for mainline stable releases.
Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"`
}
func (x *Version) Reset() {
*x = Version{}
if protoimpl.UnsafeEnabled {
mi := &file_extensions_extension_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Version) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Version) ProtoMessage() {}
func (x *Version) ProtoReflect() protoreflect.Message {
mi := &file_extensions_extension_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 Version.ProtoReflect.Descriptor instead.
func (*Version) Descriptor() ([]byte, []int) {
return file_extensions_extension_proto_rawDescGZIP(), []int{0}
}
func (x *Version) GetMajor() int32 {
if x != nil {
return x.Major
}
return 0
}
func (x *Version) GetMinor() int32 {
if x != nil {
return x.Minor
}
return 0
}
func (x *Version) GetPatch() int32 {
if x != nil {
return x.Patch
}
return 0
}
func (x *Version) GetSuffix() string {
if x != nil {
return x.Suffix
}
return ""
}
// An encoded Request is written to the ExtensionHandler's stdin.
type ExtensionHandlerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The extension to process.
Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"`
// The version number of Gnostic.
CompilerVersion *Version `protobuf:"bytes,2,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"`
}
func (x *ExtensionHandlerRequest) Reset() {
*x = ExtensionHandlerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_extensions_extension_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExtensionHandlerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExtensionHandlerRequest) ProtoMessage() {}
func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message {
mi := &file_extensions_extension_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 ExtensionHandlerRequest.ProtoReflect.Descriptor instead.
func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) {
return file_extensions_extension_proto_rawDescGZIP(), []int{1}
}
func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper {
if x != nil {
return x.Wrapper
}
return nil
}
func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version {
if x != nil {
return x.CompilerVersion
}
return nil
}
// The extensions writes an encoded ExtensionHandlerResponse to stdout.
type ExtensionHandlerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// true if the extension is handled by the extension handler; false otherwise
Handled bool `protobuf:"varint,1,opt,name=handled,proto3" json:"handled,omitempty"`
// Error message(s). If non-empty, the extension handling failed.
// The extension handler 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 extension from
// operating as intended. Errors which indicate a problem in gnostic
// itself -- such as the input Document being unparseable -- should be
// reported by writing a message to stderr and exiting with a non-zero
// status code.
Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
// text output
Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *ExtensionHandlerResponse) Reset() {
*x = ExtensionHandlerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_extensions_extension_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExtensionHandlerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExtensionHandlerResponse) ProtoMessage() {}
func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message {
mi := &file_extensions_extension_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 ExtensionHandlerResponse.ProtoReflect.Descriptor instead.
func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) {
return file_extensions_extension_proto_rawDescGZIP(), []int{2}
}
func (x *ExtensionHandlerResponse) GetHandled() bool {
if x != nil {
return x.Handled
}
return false
}
func (x *ExtensionHandlerResponse) GetErrors() []string {
if x != nil {
return x.Errors
}
return nil
}
func (x *ExtensionHandlerResponse) GetValue() *anypb.Any {
if x != nil {
return x.Value
}
return nil
}
type Wrapper struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// version of the OpenAPI specification in which this extension was written.
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// Name of the extension.
ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName,proto3" json:"extension_name,omitempty"`
// YAML-formatted extension value.
Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"`
}
func (x *Wrapper) Reset() {
*x = Wrapper{}
if protoimpl.UnsafeEnabled {
mi := &file_extensions_extension_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Wrapper) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Wrapper) ProtoMessage() {}
func (x *Wrapper) ProtoReflect() protoreflect.Message {
mi := &file_extensions_extension_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 Wrapper.ProtoReflect.Descriptor instead.
func (*Wrapper) Descriptor() ([]byte, []int) {
return file_extensions_extension_proto_rawDescGZIP(), []int{3}
}
func (x *Wrapper) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Wrapper) GetExtensionName() string {
if x != nil {
return x.ExtensionName
}
return ""
}
func (x *Wrapper) GetYaml() string {
if x != nil {
return x.Yaml
}
return ""
}
var File_extensions_extension_proto protoreflect.FileDescriptor
var file_extensions_extension_proto_rawDesc = []byte{
0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6e,
0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a,
0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14,
0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d,
0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75,
0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66,
0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37,
0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07,
0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69,
0x6c, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x22, 0x78, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61,
0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12,
0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x07, 0x57,
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x4d, 0x0a, 0x0e, 0x6f,
0x72, 0x67, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x47,
0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50,
0x01, 0x5a, 0x21, 0x2e, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3b,
0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x5f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x47, 0x4e, 0x58, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_extensions_extension_proto_rawDescOnce sync.Once
file_extensions_extension_proto_rawDescData = file_extensions_extension_proto_rawDesc
)
func file_extensions_extension_proto_rawDescGZIP() []byte {
file_extensions_extension_proto_rawDescOnce.Do(func() {
file_extensions_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_extensions_extension_proto_rawDescData)
})
return file_extensions_extension_proto_rawDescData
}
var file_extensions_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_extensions_extension_proto_goTypes = []interface{}{
(*Version)(nil), // 0: gnostic.extension.v1.Version
(*ExtensionHandlerRequest)(nil), // 1: gnostic.extension.v1.ExtensionHandlerRequest
(*ExtensionHandlerResponse)(nil), // 2: gnostic.extension.v1.ExtensionHandlerResponse
(*Wrapper)(nil), // 3: gnostic.extension.v1.Wrapper
(*anypb.Any)(nil), // 4: google.protobuf.Any
}
var file_extensions_extension_proto_depIdxs = []int32{
3, // 0: gnostic.extension.v1.ExtensionHandlerRequest.wrapper:type_name -> gnostic.extension.v1.Wrapper
0, // 1: gnostic.extension.v1.ExtensionHandlerRequest.compiler_version:type_name -> gnostic.extension.v1.Version
4, // 2: gnostic.extension.v1.ExtensionHandlerResponse.value:type_name -> google.protobuf.Any
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_extensions_extension_proto_init() }
func file_extensions_extension_proto_init() {
if File_extensions_extension_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_extensions_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Version); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_extensions_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExtensionHandlerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_extensions_extension_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExtensionHandlerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_extensions_extension_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Wrapper); 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_extensions_extension_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_extensions_extension_proto_goTypes,
DependencyIndexes: file_extensions_extension_proto_depIdxs,
MessageInfos: file_extensions_extension_proto_msgTypes,
}.Build()
File_extensions_extension_proto = out.File
file_extensions_extension_proto_rawDesc = nil
file_extensions_extension_proto_goTypes = nil
file_extensions_extension_proto_depIdxs = nil
}
gnostic-models-0.6.8/extensions/extension.proto 0000664 0000000 0000000 00000006532 14225377162 0021773 0 ustar 00root root 0000000 0000000 // Copyright 2017 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 gnostic.extension.v1;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "GnosticExtension";
// The Java package name must be proto package name with proper prefix.
option java_package = "org.gnostic.v1";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
//
// "Gnostic Extension"
option objc_class_prefix = "GNX";
// The Go package name.
option go_package = "./extensions;gnostic_extension_v1";
// The version number of Gnostic.
message Version {
int32 major = 1;
int32 minor = 2;
int32 patch = 3;
// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
// be empty for mainline stable releases.
string suffix = 4;
}
// An encoded Request is written to the ExtensionHandler's stdin.
message ExtensionHandlerRequest {
// The extension to process.
Wrapper wrapper = 1;
// The version number of Gnostic.
Version compiler_version = 2;
}
// The extensions writes an encoded ExtensionHandlerResponse to stdout.
message ExtensionHandlerResponse {
// true if the extension is handled by the extension handler; false otherwise
bool handled = 1;
// Error message(s). If non-empty, the extension handling failed.
// The extension handler 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 extension from
// operating as intended. Errors which indicate a problem in gnostic
// itself -- such as the input Document being unparseable -- should be
// reported by writing a message to stderr and exiting with a non-zero
// status code.
repeated string errors = 2;
// text output
google.protobuf.Any value = 3;
}
message Wrapper {
// version of the OpenAPI specification in which this extension was written.
string version = 1;
// Name of the extension.
string extension_name = 2;
// YAML-formatted extension value.
string yaml = 3;
}
gnostic-models-0.6.8/extensions/extensions.go 0000664 0000000 0000000 00000003545 14225377162 0021421 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package gnostic_extension_v1
import (
"io/ioutil"
"log"
"os"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
)
type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)
// Main implements the main program of an extension handler.
func Main(handler extensionHandler) {
// unpack the request
data, err := ioutil.ReadAll(os.Stdin)
if err != nil {
log.Println("File error:", err.Error())
os.Exit(1)
}
if len(data) == 0 {
log.Println("No input data.")
os.Exit(1)
}
request := &ExtensionHandlerRequest{}
err = proto.Unmarshal(data, request)
if err != nil {
log.Println("Input error:", err.Error())
os.Exit(1)
}
// call the handler
handled, output, err := handler(request.Wrapper.ExtensionName, request.Wrapper.Yaml)
// respond with the output of the handler
response := &ExtensionHandlerResponse{
Handled: false, // default assumption
Errors: make([]string, 0),
}
if err != nil {
response.Errors = append(response.Errors, err.Error())
} else if handled {
response.Handled = true
response.Value, err = ptypes.MarshalAny(output)
if err != nil {
response.Errors = append(response.Errors, err.Error())
}
}
responseBytes, _ := proto.Marshal(response)
os.Stdout.Write(responseBytes)
}
gnostic-models-0.6.8/go.mod 0000664 0000000 0000000 00000000370 14225377162 0015573 0 ustar 00root root 0000000 0000000 module github.com/google/gnostic-models
go 1.18
require (
google.golang.org/protobuf v1.27.1
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)
require github.com/golang/protobuf v1.5.2
gnostic-models-0.6.8/go.sum 0000664 0000000 0000000 00000002610 14225377162 0015617 0 ustar 00root root 0000000 0000000 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gnostic-models-0.6.8/jsonschema/ 0000775 0000000 0000000 00000000000 14225377162 0016617 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/jsonschema/README.md 0000664 0000000 0000000 00000000140 14225377162 0020071 0 ustar 00root root 0000000 0000000 # jsonschema
This directory contains code for reading, writing, and manipulating JSON
schemas.
gnostic-models-0.6.8/jsonschema/base.go 0000664 0000000 0000000 00000015050 14225377162 0020061 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
package jsonschema
import (
"encoding/base64"
)
func baseSchemaBytes() ([]byte, error){
return base64.StdEncoding.DecodeString(
`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi
JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl
c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK
ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg
ICAgICAgIm1pbkl0ZW1zIjogMSwKICAgICAgICAgICAgIml0ZW1zIjogeyAiJHJlZiI6ICIjIiB9CiAg
ICAgICAgfSwKICAgICAgICAicG9zaXRpdmVJbnRlZ2VyIjogewogICAgICAgICAgICAidHlwZSI6ICJp
bnRlZ2VyIiwKICAgICAgICAgICAgIm1pbmltdW0iOiAwCiAgICAgICAgfSwKICAgICAgICAicG9zaXRp
dmVJbnRlZ2VyRGVmYXVsdDAiOiB7CiAgICAgICAgICAgICJhbGxPZiI6IFsgeyAiJHJlZiI6ICIjL2Rl
ZmluaXRpb25zL3Bvc2l0aXZlSW50ZWdlciIgfSwgeyAiZGVmYXVsdCI6IDAgfSBdCiAgICAgICAgfSwK
ICAgICAgICAic2ltcGxlVHlwZXMiOiB7CiAgICAgICAgICAgICJlbnVtIjogWyAiYXJyYXkiLCAiYm9v
bGVhbiIsICJpbnRlZ2VyIiwgIm51bGwiLCAibnVtYmVyIiwgIm9iamVjdCIsICJzdHJpbmciIF0KICAg
ICAgICB9LAogICAgICAgICJzdHJpbmdBcnJheSI6IHsKICAgICAgICAgICAgInR5cGUiOiAiYXJyYXki
LAogICAgICAgICAgICAiaXRlbXMiOiB7ICJ0eXBlIjogInN0cmluZyIgfSwKICAgICAgICAgICAgIm1p
bkl0ZW1zIjogMSwKICAgICAgICAgICAgInVuaXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgIH0KICAgIH0s
CiAgICAidHlwZSI6ICJvYmplY3QiLAogICAgInByb3BlcnRpZXMiOiB7CiAgICAgICAgImlkIjogewog
ICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICAgICAiZm9ybWF0IjogInVyaSIKICAg
ICAgICB9LAogICAgICAgICIkc2NoZW1hIjogewogICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciLAog
ICAgICAgICAgICAiZm9ybWF0IjogInVyaSIKICAgICAgICB9LAogICAgICAgICJ0aXRsZSI6IHsKICAg
ICAgICAgICAgInR5cGUiOiAic3RyaW5nIgogICAgICAgIH0sCiAgICAgICAgImRlc2NyaXB0aW9uIjog
ewogICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciCiAgICAgICAgfSwKICAgICAgICAiZGVmYXVsdCI6
IHt9LAogICAgICAgICJtdWx0aXBsZU9mIjogewogICAgICAgICAgICAidHlwZSI6ICJudW1iZXIiLAog
ICAgICAgICAgICAibWluaW11bSI6IDAsCiAgICAgICAgICAgICJleGNsdXNpdmVNaW5pbXVtIjogdHJ1
ZQogICAgICAgIH0sCiAgICAgICAgIm1heGltdW0iOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm51bWJl
ciIKICAgICAgICB9LAogICAgICAgICJleGNsdXNpdmVNYXhpbXVtIjogewogICAgICAgICAgICAidHlw
ZSI6ICJib29sZWFuIiwKICAgICAgICAgICAgImRlZmF1bHQiOiBmYWxzZQogICAgICAgIH0sCiAgICAg
ICAgIm1pbmltdW0iOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm51bWJlciIKICAgICAgICB9LAogICAg
ICAgICJleGNsdXNpdmVNaW5pbXVtIjogewogICAgICAgICAgICAidHlwZSI6ICJib29sZWFuIiwKICAg
ICAgICAgICAgImRlZmF1bHQiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIm1heExlbmd0aCI6IHsg
IiRyZWYiOiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXIiIH0sCiAgICAgICAgIm1pbkxlbmd0
aCI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXJEZWZhdWx0MCIgfSwKICAg
ICAgICAicGF0dGVybiI6IHsKICAgICAgICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgICAgICAg
ImZvcm1hdCI6ICJyZWdleCIKICAgICAgICB9LAogICAgICAgICJhZGRpdGlvbmFsSXRlbXMiOiB7CiAg
ICAgICAgICAgICJhbnlPZiI6IFsKICAgICAgICAgICAgICAgIHsgInR5cGUiOiAiYm9vbGVhbiIgfSwK
ICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfQogICAgICAgICAgICBdLAogICAgICAgICAgICAi
ZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAiaXRlbXMiOiB7CiAgICAgICAgICAgICJhbnlP
ZiI6IFsKICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAgICAgIHsgIiRy
ZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIgfQogICAgICAgICAgICBdLAogICAgICAgICAg
ICAiZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAibWF4SXRlbXMiOiB7ICIkcmVmIjogIiMv
ZGVmaW5pdGlvbnMvcG9zaXRpdmVJbnRlZ2VyIiB9LAogICAgICAgICJtaW5JdGVtcyI6IHsgIiRyZWYi
OiAiIy9kZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXJEZWZhdWx0MCIgfSwKICAgICAgICAidW5pcXVl
SXRlbXMiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImJvb2xlYW4iLAogICAgICAgICAgICAiZGVmYXVs
dCI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAibWF4UHJvcGVydGllcyI6IHsgIiRyZWYiOiAiIy9k
ZWZpbml0aW9ucy9wb3NpdGl2ZUludGVnZXIiIH0sCiAgICAgICAgIm1pblByb3BlcnRpZXMiOiB7ICIk
cmVmIjogIiMvZGVmaW5pdGlvbnMvcG9zaXRpdmVJbnRlZ2VyRGVmYXVsdDAiIH0sCiAgICAgICAgInJl
cXVpcmVkIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3N0cmluZ0FycmF5IiB9LAogICAgICAgICJh
ZGRpdGlvbmFsUHJvcGVydGllcyI6IHsKICAgICAgICAgICAgImFueU9mIjogWwogICAgICAgICAgICAg
ICAgeyAidHlwZSI6ICJib29sZWFuIiB9LAogICAgICAgICAgICAgICAgeyAiJHJlZiI6ICIjIiB9CiAg
ICAgICAgICAgIF0sCiAgICAgICAgICAgICJkZWZhdWx0Ijoge30KICAgICAgICB9LAogICAgICAgICJk
ZWZpbml0aW9ucyI6IHsKICAgICAgICAgICAgInR5cGUiOiAib2JqZWN0IiwKICAgICAgICAgICAgImFk
ZGl0aW9uYWxQcm9wZXJ0aWVzIjogeyAiJHJlZiI6ICIjIiB9LAogICAgICAgICAgICAiZGVmYXVsdCI6
IHt9CiAgICAgICAgfSwKICAgICAgICAicHJvcGVydGllcyI6IHsKICAgICAgICAgICAgInR5cGUiOiAi
b2JqZWN0IiwKICAgICAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjogeyAiJHJlZiI6ICIjIiB9
LAogICAgICAgICAgICAiZGVmYXVsdCI6IHt9CiAgICAgICAgfSwKICAgICAgICAicGF0dGVyblByb3Bl
cnRpZXMiOiB7CiAgICAgICAgICAgICJ0eXBlIjogIm9iamVjdCIsCiAgICAgICAgICAgICJhZGRpdGlv
bmFsUHJvcGVydGllcyI6IHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAgImRlZmF1bHQiOiB7fQog
ICAgICAgIH0sCiAgICAgICAgImRlcGVuZGVuY2llcyI6IHsKICAgICAgICAgICAgInR5cGUiOiAib2Jq
ZWN0IiwKICAgICAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjogewogICAgICAgICAgICAgICAg
ImFueU9mIjogWwogICAgICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIyIgfSwKICAgICAgICAgICAg
ICAgICAgICB7ICIkcmVmIjogIiMvZGVmaW5pdGlvbnMvc3RyaW5nQXJyYXkiIH0KICAgICAgICAgICAg
ICAgIF0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgImVudW0iOiB7CiAgICAgICAgICAg
ICJ0eXBlIjogImFycmF5IiwKICAgICAgICAgICAgIm1pbkl0ZW1zIjogMSwKICAgICAgICAgICAgInVu
aXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgIH0sCiAgICAgICAgInR5cGUiOiB7CiAgICAgICAgICAgICJh
bnlPZiI6IFsKICAgICAgICAgICAgICAgIHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zaW1wbGVUeXBl
cyIgfSwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJhcnJheSIs
CiAgICAgICAgICAgICAgICAgICAgIml0ZW1zIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NpbXBs
ZVR5cGVzIiB9LAogICAgICAgICAgICAgICAgICAgICJtaW5JdGVtcyI6IDEsCiAgICAgICAgICAgICAg
ICAgICAgInVuaXF1ZUl0ZW1zIjogdHJ1ZQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdCiAg
ICAgICAgfSwKICAgICAgICAiYWxsT2YiOiB7ICIkcmVmIjogIiMvZGVmaW5pdGlvbnMvc2NoZW1hQXJy
YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5
IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg
fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6
IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1
c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)}
gnostic-models-0.6.8/jsonschema/display.go 0000664 0000000 0000000 00000015312 14225377162 0020615 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package jsonschema
import (
"fmt"
"strings"
)
//
// DISPLAY
// The following methods display Schemas.
//
// Description returns a string representation of a string or string array.
func (s *StringOrStringArray) Description() string {
if s.String != nil {
return *s.String
}
if s.StringArray != nil {
return strings.Join(*s.StringArray, ", ")
}
return ""
}
// Returns a string representation of a Schema.
func (schema *Schema) String() string {
return schema.describeSchema("")
}
// Helper: Returns a string representation of a Schema indented by a specified string.
func (schema *Schema) describeSchema(indent string) string {
result := ""
if schema.Schema != nil {
result += indent + "$schema: " + *(schema.Schema) + "\n"
}
if schema.ID != nil {
result += indent + "id: " + *(schema.ID) + "\n"
}
if schema.MultipleOf != nil {
result += indent + fmt.Sprintf("multipleOf: %+v\n", *(schema.MultipleOf))
}
if schema.Maximum != nil {
result += indent + fmt.Sprintf("maximum: %+v\n", *(schema.Maximum))
}
if schema.ExclusiveMaximum != nil {
result += indent + fmt.Sprintf("exclusiveMaximum: %+v\n", *(schema.ExclusiveMaximum))
}
if schema.Minimum != nil {
result += indent + fmt.Sprintf("minimum: %+v\n", *(schema.Minimum))
}
if schema.ExclusiveMinimum != nil {
result += indent + fmt.Sprintf("exclusiveMinimum: %+v\n", *(schema.ExclusiveMinimum))
}
if schema.MaxLength != nil {
result += indent + fmt.Sprintf("maxLength: %+v\n", *(schema.MaxLength))
}
if schema.MinLength != nil {
result += indent + fmt.Sprintf("minLength: %+v\n", *(schema.MinLength))
}
if schema.Pattern != nil {
result += indent + fmt.Sprintf("pattern: %+v\n", *(schema.Pattern))
}
if schema.AdditionalItems != nil {
s := schema.AdditionalItems.Schema
if s != nil {
result += indent + "additionalItems:\n"
result += s.describeSchema(indent + " ")
} else {
b := *(schema.AdditionalItems.Boolean)
result += indent + fmt.Sprintf("additionalItems: %+v\n", b)
}
}
if schema.Items != nil {
result += indent + "items:\n"
items := schema.Items
if items.SchemaArray != nil {
for i, s := range *(items.SchemaArray) {
result += indent + " " + fmt.Sprintf("%d", i) + ":\n"
result += s.describeSchema(indent + " " + " ")
}
} else if items.Schema != nil {
result += items.Schema.describeSchema(indent + " " + " ")
}
}
if schema.MaxItems != nil {
result += indent + fmt.Sprintf("maxItems: %+v\n", *(schema.MaxItems))
}
if schema.MinItems != nil {
result += indent + fmt.Sprintf("minItems: %+v\n", *(schema.MinItems))
}
if schema.UniqueItems != nil {
result += indent + fmt.Sprintf("uniqueItems: %+v\n", *(schema.UniqueItems))
}
if schema.MaxProperties != nil {
result += indent + fmt.Sprintf("maxProperties: %+v\n", *(schema.MaxProperties))
}
if schema.MinProperties != nil {
result += indent + fmt.Sprintf("minProperties: %+v\n", *(schema.MinProperties))
}
if schema.Required != nil {
result += indent + fmt.Sprintf("required: %+v\n", *(schema.Required))
}
if schema.AdditionalProperties != nil {
s := schema.AdditionalProperties.Schema
if s != nil {
result += indent + "additionalProperties:\n"
result += s.describeSchema(indent + " ")
} else {
b := *(schema.AdditionalProperties.Boolean)
result += indent + fmt.Sprintf("additionalProperties: %+v\n", b)
}
}
if schema.Properties != nil {
result += indent + "properties:\n"
for _, pair := range *(schema.Properties) {
name := pair.Name
s := pair.Value
result += indent + " " + name + ":\n"
result += s.describeSchema(indent + " " + " ")
}
}
if schema.PatternProperties != nil {
result += indent + "patternProperties:\n"
for _, pair := range *(schema.PatternProperties) {
name := pair.Name
s := pair.Value
result += indent + " " + name + ":\n"
result += s.describeSchema(indent + " " + " ")
}
}
if schema.Dependencies != nil {
result += indent + "dependencies:\n"
for _, pair := range *(schema.Dependencies) {
name := pair.Name
schemaOrStringArray := pair.Value
s := schemaOrStringArray.Schema
if s != nil {
result += indent + " " + name + ":\n"
result += s.describeSchema(indent + " " + " ")
} else {
a := schemaOrStringArray.StringArray
if a != nil {
result += indent + " " + name + ":\n"
for _, s2 := range *a {
result += indent + " " + " " + s2 + "\n"
}
}
}
}
}
if schema.Enumeration != nil {
result += indent + "enumeration:\n"
for _, value := range *(schema.Enumeration) {
if value.String != nil {
result += indent + " " + fmt.Sprintf("%+v\n", *value.String)
} else {
result += indent + " " + fmt.Sprintf("%+v\n", *value.Bool)
}
}
}
if schema.Type != nil {
result += indent + fmt.Sprintf("type: %+v\n", schema.Type.Description())
}
if schema.AllOf != nil {
result += indent + "allOf:\n"
for _, s := range *(schema.AllOf) {
result += s.describeSchema(indent + " ")
result += indent + "-\n"
}
}
if schema.AnyOf != nil {
result += indent + "anyOf:\n"
for _, s := range *(schema.AnyOf) {
result += s.describeSchema(indent + " ")
result += indent + "-\n"
}
}
if schema.OneOf != nil {
result += indent + "oneOf:\n"
for _, s := range *(schema.OneOf) {
result += s.describeSchema(indent + " ")
result += indent + "-\n"
}
}
if schema.Not != nil {
result += indent + "not:\n"
result += schema.Not.describeSchema(indent + " ")
}
if schema.Definitions != nil {
result += indent + "definitions:\n"
for _, pair := range *(schema.Definitions) {
name := pair.Name
s := pair.Value
result += indent + " " + name + ":\n"
result += s.describeSchema(indent + " " + " ")
}
}
if schema.Title != nil {
result += indent + "title: " + *(schema.Title) + "\n"
}
if schema.Description != nil {
result += indent + "description: " + *(schema.Description) + "\n"
}
if schema.Default != nil {
result += indent + "default:\n"
result += indent + fmt.Sprintf(" %+v\n", *(schema.Default))
}
if schema.Format != nil {
result += indent + "format: " + *(schema.Format) + "\n"
}
if schema.Ref != nil {
result += indent + "$ref: " + *(schema.Ref) + "\n"
}
return result
}
gnostic-models-0.6.8/jsonschema/generate-base.go 0000664 0000000 0000000 00000002573 14225377162 0021657 0 ustar 00root root 0000000 0000000 // 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.
// +build ignore
package main
import (
"encoding/base64"
"io/ioutil"
"os"
)
func check(err error) {
if err != nil {
panic(err)
}
}
func write(f *os.File, s string) {
_, err := f.WriteString(s)
check(err)
}
func main() {
f, err := os.Create("base.go")
check(err)
defer f.Close()
write(f, `
// THIS FILE IS AUTOMATICALLY GENERATED.
package jsonschema
import (
"encoding/base64"
)
func baseSchemaBytes() ([]byte, error){
return base64.StdEncoding.DecodeString(
`)
write(f, "`")
b, err := ioutil.ReadFile("schema.json")
check(err)
s := base64.StdEncoding.EncodeToString(b)
limit := len(s)
width := 80
for i := 0; i < limit; i += width {
if i > 0 {
write(f, "\n")
}
j := i + width
if j > limit {
j = limit
}
write(f, s[i:j])
}
write(f, "`)}")
}
gnostic-models-0.6.8/jsonschema/models.go 0000664 0000000 0000000 00000014715 14225377162 0020441 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
// Package jsonschema supports the reading, writing, and manipulation
// of JSON Schemas.
package jsonschema
import "gopkg.in/yaml.v3"
// The Schema struct models a JSON Schema and, because schemas are
// defined hierarchically, contains many references to itself.
// All fields are pointers and are nil if the associated values
// are not specified.
type Schema struct {
Schema *string // $schema
ID *string // id keyword used for $ref resolution scope
Ref *string // $ref, i.e. JSON Pointers
// http://json-schema.org/latest/json-schema-validation.html
// 5.1. Validation keywords for numeric instances (number and integer)
MultipleOf *SchemaNumber
Maximum *SchemaNumber
ExclusiveMaximum *bool
Minimum *SchemaNumber
ExclusiveMinimum *bool
// 5.2. Validation keywords for strings
MaxLength *int64
MinLength *int64
Pattern *string
// 5.3. Validation keywords for arrays
AdditionalItems *SchemaOrBoolean
Items *SchemaOrSchemaArray
MaxItems *int64
MinItems *int64
UniqueItems *bool
// 5.4. Validation keywords for objects
MaxProperties *int64
MinProperties *int64
Required *[]string
AdditionalProperties *SchemaOrBoolean
Properties *[]*NamedSchema
PatternProperties *[]*NamedSchema
Dependencies *[]*NamedSchemaOrStringArray
// 5.5. Validation keywords for any instance type
Enumeration *[]SchemaEnumValue
Type *StringOrStringArray
AllOf *[]*Schema
AnyOf *[]*Schema
OneOf *[]*Schema
Not *Schema
Definitions *[]*NamedSchema
// 6. Metadata keywords
Title *string
Description *string
Default *yaml.Node
// 7. Semantic validation with "format"
Format *string
}
// These helper structs represent "combination" types that generally can
// have values of one type or another. All are used to represent parts
// of Schemas.
// SchemaNumber represents a value that can be either an Integer or a Float.
type SchemaNumber struct {
Integer *int64
Float *float64
}
// NewSchemaNumberWithInteger creates and returns a new object
func NewSchemaNumberWithInteger(i int64) *SchemaNumber {
result := &SchemaNumber{}
result.Integer = &i
return result
}
// NewSchemaNumberWithFloat creates and returns a new object
func NewSchemaNumberWithFloat(f float64) *SchemaNumber {
result := &SchemaNumber{}
result.Float = &f
return result
}
// SchemaOrBoolean represents a value that can be either a Schema or a Boolean.
type SchemaOrBoolean struct {
Schema *Schema
Boolean *bool
}
// NewSchemaOrBooleanWithSchema creates and returns a new object
func NewSchemaOrBooleanWithSchema(s *Schema) *SchemaOrBoolean {
result := &SchemaOrBoolean{}
result.Schema = s
return result
}
// NewSchemaOrBooleanWithBoolean creates and returns a new object
func NewSchemaOrBooleanWithBoolean(b bool) *SchemaOrBoolean {
result := &SchemaOrBoolean{}
result.Boolean = &b
return result
}
// StringOrStringArray represents a value that can be either
// a String or an Array of Strings.
type StringOrStringArray struct {
String *string
StringArray *[]string
}
// NewStringOrStringArrayWithString creates and returns a new object
func NewStringOrStringArrayWithString(s string) *StringOrStringArray {
result := &StringOrStringArray{}
result.String = &s
return result
}
// NewStringOrStringArrayWithStringArray creates and returns a new object
func NewStringOrStringArrayWithStringArray(a []string) *StringOrStringArray {
result := &StringOrStringArray{}
result.StringArray = &a
return result
}
// SchemaOrStringArray represents a value that can be either
// a Schema or an Array of Strings.
type SchemaOrStringArray struct {
Schema *Schema
StringArray *[]string
}
// SchemaOrSchemaArray represents a value that can be either
// a Schema or an Array of Schemas.
type SchemaOrSchemaArray struct {
Schema *Schema
SchemaArray *[]*Schema
}
// NewSchemaOrSchemaArrayWithSchema creates and returns a new object
func NewSchemaOrSchemaArrayWithSchema(s *Schema) *SchemaOrSchemaArray {
result := &SchemaOrSchemaArray{}
result.Schema = s
return result
}
// NewSchemaOrSchemaArrayWithSchemaArray creates and returns a new object
func NewSchemaOrSchemaArrayWithSchemaArray(a []*Schema) *SchemaOrSchemaArray {
result := &SchemaOrSchemaArray{}
result.SchemaArray = &a
return result
}
// SchemaEnumValue represents a value that can be part of an
// enumeration in a Schema.
type SchemaEnumValue struct {
String *string
Bool *bool
}
// NamedSchema is a name-value pair that is used to emulate maps
// with ordered keys.
type NamedSchema struct {
Name string
Value *Schema
}
// NewNamedSchema creates and returns a new object
func NewNamedSchema(name string, value *Schema) *NamedSchema {
return &NamedSchema{Name: name, Value: value}
}
// NamedSchemaOrStringArray is a name-value pair that is used
// to emulate maps with ordered keys.
type NamedSchemaOrStringArray struct {
Name string
Value *SchemaOrStringArray
}
// Access named subschemas by name
func namedSchemaArrayElementWithName(array *[]*NamedSchema, name string) *Schema {
if array == nil {
return nil
}
for _, pair := range *array {
if pair.Name == name {
return pair.Value
}
}
return nil
}
// PropertyWithName returns the selected element.
func (s *Schema) PropertyWithName(name string) *Schema {
return namedSchemaArrayElementWithName(s.Properties, name)
}
// PatternPropertyWithName returns the selected element.
func (s *Schema) PatternPropertyWithName(name string) *Schema {
return namedSchemaArrayElementWithName(s.PatternProperties, name)
}
// DefinitionWithName returns the selected element.
func (s *Schema) DefinitionWithName(name string) *Schema {
return namedSchemaArrayElementWithName(s.Definitions, name)
}
// AddProperty adds a named property.
func (s *Schema) AddProperty(name string, property *Schema) {
*s.Properties = append(*s.Properties, NewNamedSchema(name, property))
}
gnostic-models-0.6.8/jsonschema/operations.go 0000664 0000000 0000000 00000025161 14225377162 0021336 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package jsonschema
import (
"fmt"
"log"
"strings"
)
//
// OPERATIONS
// The following methods perform operations on Schemas.
//
// IsEmpty returns true if no members of the Schema are specified.
func (schema *Schema) IsEmpty() bool {
return (schema.Schema == nil) &&
(schema.ID == nil) &&
(schema.MultipleOf == nil) &&
(schema.Maximum == nil) &&
(schema.ExclusiveMaximum == nil) &&
(schema.Minimum == nil) &&
(schema.ExclusiveMinimum == nil) &&
(schema.MaxLength == nil) &&
(schema.MinLength == nil) &&
(schema.Pattern == nil) &&
(schema.AdditionalItems == nil) &&
(schema.Items == nil) &&
(schema.MaxItems == nil) &&
(schema.MinItems == nil) &&
(schema.UniqueItems == nil) &&
(schema.MaxProperties == nil) &&
(schema.MinProperties == nil) &&
(schema.Required == nil) &&
(schema.AdditionalProperties == nil) &&
(schema.Properties == nil) &&
(schema.PatternProperties == nil) &&
(schema.Dependencies == nil) &&
(schema.Enumeration == nil) &&
(schema.Type == nil) &&
(schema.AllOf == nil) &&
(schema.AnyOf == nil) &&
(schema.OneOf == nil) &&
(schema.Not == nil) &&
(schema.Definitions == nil) &&
(schema.Title == nil) &&
(schema.Description == nil) &&
(schema.Default == nil) &&
(schema.Format == nil) &&
(schema.Ref == nil)
}
// IsEqual returns true if two schemas are equal.
func (schema *Schema) IsEqual(schema2 *Schema) bool {
return schema.String() == schema2.String()
}
// SchemaOperation represents a function that can be applied to a Schema.
type SchemaOperation func(schema *Schema, context string)
// Applies a specified function to a Schema and all of the Schemas that it contains.
func (schema *Schema) applyToSchemas(operation SchemaOperation, context string) {
if schema.AdditionalItems != nil {
s := schema.AdditionalItems.Schema
if s != nil {
s.applyToSchemas(operation, "AdditionalItems")
}
}
if schema.Items != nil {
if schema.Items.SchemaArray != nil {
for _, s := range *(schema.Items.SchemaArray) {
s.applyToSchemas(operation, "Items.SchemaArray")
}
} else if schema.Items.Schema != nil {
schema.Items.Schema.applyToSchemas(operation, "Items.Schema")
}
}
if schema.AdditionalProperties != nil {
s := schema.AdditionalProperties.Schema
if s != nil {
s.applyToSchemas(operation, "AdditionalProperties")
}
}
if schema.Properties != nil {
for _, pair := range *(schema.Properties) {
s := pair.Value
s.applyToSchemas(operation, "Properties")
}
}
if schema.PatternProperties != nil {
for _, pair := range *(schema.PatternProperties) {
s := pair.Value
s.applyToSchemas(operation, "PatternProperties")
}
}
if schema.Dependencies != nil {
for _, pair := range *(schema.Dependencies) {
schemaOrStringArray := pair.Value
s := schemaOrStringArray.Schema
if s != nil {
s.applyToSchemas(operation, "Dependencies")
}
}
}
if schema.AllOf != nil {
for _, s := range *(schema.AllOf) {
s.applyToSchemas(operation, "AllOf")
}
}
if schema.AnyOf != nil {
for _, s := range *(schema.AnyOf) {
s.applyToSchemas(operation, "AnyOf")
}
}
if schema.OneOf != nil {
for _, s := range *(schema.OneOf) {
s.applyToSchemas(operation, "OneOf")
}
}
if schema.Not != nil {
schema.Not.applyToSchemas(operation, "Not")
}
if schema.Definitions != nil {
for _, pair := range *(schema.Definitions) {
s := pair.Value
s.applyToSchemas(operation, "Definitions")
}
}
operation(schema, context)
}
// CopyProperties copies all non-nil properties from the source Schema to the schema Schema.
func (schema *Schema) CopyProperties(source *Schema) {
if source.Schema != nil {
schema.Schema = source.Schema
}
if source.ID != nil {
schema.ID = source.ID
}
if source.MultipleOf != nil {
schema.MultipleOf = source.MultipleOf
}
if source.Maximum != nil {
schema.Maximum = source.Maximum
}
if source.ExclusiveMaximum != nil {
schema.ExclusiveMaximum = source.ExclusiveMaximum
}
if source.Minimum != nil {
schema.Minimum = source.Minimum
}
if source.ExclusiveMinimum != nil {
schema.ExclusiveMinimum = source.ExclusiveMinimum
}
if source.MaxLength != nil {
schema.MaxLength = source.MaxLength
}
if source.MinLength != nil {
schema.MinLength = source.MinLength
}
if source.Pattern != nil {
schema.Pattern = source.Pattern
}
if source.AdditionalItems != nil {
schema.AdditionalItems = source.AdditionalItems
}
if source.Items != nil {
schema.Items = source.Items
}
if source.MaxItems != nil {
schema.MaxItems = source.MaxItems
}
if source.MinItems != nil {
schema.MinItems = source.MinItems
}
if source.UniqueItems != nil {
schema.UniqueItems = source.UniqueItems
}
if source.MaxProperties != nil {
schema.MaxProperties = source.MaxProperties
}
if source.MinProperties != nil {
schema.MinProperties = source.MinProperties
}
if source.Required != nil {
schema.Required = source.Required
}
if source.AdditionalProperties != nil {
schema.AdditionalProperties = source.AdditionalProperties
}
if source.Properties != nil {
schema.Properties = source.Properties
}
if source.PatternProperties != nil {
schema.PatternProperties = source.PatternProperties
}
if source.Dependencies != nil {
schema.Dependencies = source.Dependencies
}
if source.Enumeration != nil {
schema.Enumeration = source.Enumeration
}
if source.Type != nil {
schema.Type = source.Type
}
if source.AllOf != nil {
schema.AllOf = source.AllOf
}
if source.AnyOf != nil {
schema.AnyOf = source.AnyOf
}
if source.OneOf != nil {
schema.OneOf = source.OneOf
}
if source.Not != nil {
schema.Not = source.Not
}
if source.Definitions != nil {
schema.Definitions = source.Definitions
}
if source.Title != nil {
schema.Title = source.Title
}
if source.Description != nil {
schema.Description = source.Description
}
if source.Default != nil {
schema.Default = source.Default
}
if source.Format != nil {
schema.Format = source.Format
}
if source.Ref != nil {
schema.Ref = source.Ref
}
}
// TypeIs returns true if the Type of a Schema includes the specified type
func (schema *Schema) TypeIs(typeName string) bool {
if schema.Type != nil {
// the schema Type is either a string or an array of strings
if schema.Type.String != nil {
return (*(schema.Type.String) == typeName)
} else if schema.Type.StringArray != nil {
for _, n := range *(schema.Type.StringArray) {
if n == typeName {
return true
}
}
}
}
return false
}
// ResolveRefs resolves "$ref" elements in a Schema and its children.
// But if a reference refers to an object type, is inside a oneOf, or contains a oneOf,
// the reference is kept and we expect downstream tools to separately model these
// referenced schemas.
func (schema *Schema) ResolveRefs() {
rootSchema := schema
count := 1
for count > 0 {
count = 0
schema.applyToSchemas(
func(schema *Schema, context string) {
if schema.Ref != nil {
resolvedRef, err := rootSchema.resolveJSONPointer(*(schema.Ref))
if err != nil {
log.Printf("%+v", err)
} else if resolvedRef.TypeIs("object") {
// don't substitute for objects, we'll model the referenced schema with a class
} else if context == "OneOf" {
// don't substitute for references inside oneOf declarations
} else if resolvedRef.OneOf != nil {
// don't substitute for references that contain oneOf declarations
} else if resolvedRef.AdditionalProperties != nil {
// don't substitute for references that look like objects
} else {
schema.Ref = nil
schema.CopyProperties(resolvedRef)
count++
}
}
}, "")
}
}
// resolveJSONPointer resolves JSON pointers.
// This current implementation is very crude and custom for OpenAPI 2.0 schemas.
// It panics for any pointer that it is unable to resolve.
func (schema *Schema) resolveJSONPointer(ref string) (result *Schema, err error) {
parts := strings.Split(ref, "#")
if len(parts) == 2 {
documentName := parts[0] + "#"
if documentName == "#" && schema.ID != nil {
documentName = *(schema.ID)
}
path := parts[1]
document := schemas[documentName]
pathParts := strings.Split(path, "/")
// we currently do a very limited (hard-coded) resolution of certain paths and log errors for missed cases
if len(pathParts) == 1 {
return document, nil
} else if len(pathParts) == 3 {
switch pathParts[1] {
case "definitions":
dictionary := document.Definitions
for _, pair := range *dictionary {
if pair.Name == pathParts[2] {
result = pair.Value
}
}
case "properties":
dictionary := document.Properties
for _, pair := range *dictionary {
if pair.Name == pathParts[2] {
result = pair.Value
}
}
default:
break
}
}
}
if result == nil {
return nil, fmt.Errorf("unresolved pointer: %+v", ref)
}
return result, nil
}
// ResolveAllOfs replaces "allOf" elements by merging their properties into the parent Schema.
func (schema *Schema) ResolveAllOfs() {
schema.applyToSchemas(
func(schema *Schema, context string) {
if schema.AllOf != nil {
for _, allOf := range *(schema.AllOf) {
schema.CopyProperties(allOf)
}
schema.AllOf = nil
}
}, "resolveAllOfs")
}
// ResolveAnyOfs replaces all "anyOf" elements with "oneOf".
func (schema *Schema) ResolveAnyOfs() {
schema.applyToSchemas(
func(schema *Schema, context string) {
if schema.AnyOf != nil {
schema.OneOf = schema.AnyOf
schema.AnyOf = nil
}
}, "resolveAnyOfs")
}
// return a pointer to a copy of a passed-in string
func stringptr(input string) (output *string) {
return &input
}
// CopyOfficialSchemaProperty copies a named property from the official JSON Schema definition
func (schema *Schema) CopyOfficialSchemaProperty(name string) {
*schema.Properties = append(*schema.Properties,
NewNamedSchema(name,
&Schema{Ref: stringptr("http://json-schema.org/draft-04/schema#/properties/" + name)}))
}
// CopyOfficialSchemaProperties copies named properties from the official JSON Schema definition
func (schema *Schema) CopyOfficialSchemaProperties(names []string) {
for _, name := range names {
schema.CopyOfficialSchemaProperty(name)
}
}
gnostic-models-0.6.8/jsonschema/reader.go 0000664 0000000 0000000 00000027334 14225377162 0020421 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
//go:generate go run generate-base.go
package jsonschema
import (
"fmt"
"io/ioutil"
"strconv"
"gopkg.in/yaml.v3"
)
// This is a global map of all known Schemas.
// It is initialized when the first Schema is created and inserted.
var schemas map[string]*Schema
// NewBaseSchema builds a schema object from an embedded json representation.
func NewBaseSchema() (schema *Schema, err error) {
b, err := baseSchemaBytes()
if err != nil {
return nil, err
}
var node yaml.Node
err = yaml.Unmarshal(b, &node)
if err != nil {
return nil, err
}
return NewSchemaFromObject(&node), nil
}
// NewSchemaFromFile reads a schema from a file.
// Currently this assumes that schemas are stored in the source distribution of this project.
func NewSchemaFromFile(filename string) (schema *Schema, err error) {
file, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
var node yaml.Node
err = yaml.Unmarshal(file, &node)
if err != nil {
return nil, err
}
return NewSchemaFromObject(&node), nil
}
// NewSchemaFromObject constructs a schema from a parsed JSON object.
// Due to the complexity of the schema representation, this is a
// custom reader and not the standard Go JSON reader (encoding/json).
func NewSchemaFromObject(jsonData *yaml.Node) *Schema {
switch jsonData.Kind {
case yaml.DocumentNode:
return NewSchemaFromObject(jsonData.Content[0])
case yaml.MappingNode:
schema := &Schema{}
for i := 0; i < len(jsonData.Content); i += 2 {
k := jsonData.Content[i].Value
v := jsonData.Content[i+1]
switch k {
case "$schema":
schema.Schema = schema.stringValue(v)
case "id":
schema.ID = schema.stringValue(v)
case "multipleOf":
schema.MultipleOf = schema.numberValue(v)
case "maximum":
schema.Maximum = schema.numberValue(v)
case "exclusiveMaximum":
schema.ExclusiveMaximum = schema.boolValue(v)
case "minimum":
schema.Minimum = schema.numberValue(v)
case "exclusiveMinimum":
schema.ExclusiveMinimum = schema.boolValue(v)
case "maxLength":
schema.MaxLength = schema.intValue(v)
case "minLength":
schema.MinLength = schema.intValue(v)
case "pattern":
schema.Pattern = schema.stringValue(v)
case "additionalItems":
schema.AdditionalItems = schema.schemaOrBooleanValue(v)
case "items":
schema.Items = schema.schemaOrSchemaArrayValue(v)
case "maxItems":
schema.MaxItems = schema.intValue(v)
case "minItems":
schema.MinItems = schema.intValue(v)
case "uniqueItems":
schema.UniqueItems = schema.boolValue(v)
case "maxProperties":
schema.MaxProperties = schema.intValue(v)
case "minProperties":
schema.MinProperties = schema.intValue(v)
case "required":
schema.Required = schema.arrayOfStringsValue(v)
case "additionalProperties":
schema.AdditionalProperties = schema.schemaOrBooleanValue(v)
case "properties":
schema.Properties = schema.mapOfSchemasValue(v)
case "patternProperties":
schema.PatternProperties = schema.mapOfSchemasValue(v)
case "dependencies":
schema.Dependencies = schema.mapOfSchemasOrStringArraysValue(v)
case "enum":
schema.Enumeration = schema.arrayOfEnumValuesValue(v)
case "type":
schema.Type = schema.stringOrStringArrayValue(v)
case "allOf":
schema.AllOf = schema.arrayOfSchemasValue(v)
case "anyOf":
schema.AnyOf = schema.arrayOfSchemasValue(v)
case "oneOf":
schema.OneOf = schema.arrayOfSchemasValue(v)
case "not":
schema.Not = NewSchemaFromObject(v)
case "definitions":
schema.Definitions = schema.mapOfSchemasValue(v)
case "title":
schema.Title = schema.stringValue(v)
case "description":
schema.Description = schema.stringValue(v)
case "default":
schema.Default = v
case "format":
schema.Format = schema.stringValue(v)
case "$ref":
schema.Ref = schema.stringValue(v)
default:
fmt.Printf("UNSUPPORTED (%s)\n", k)
}
}
// insert schema in global map
if schema.ID != nil {
if schemas == nil {
schemas = make(map[string]*Schema, 0)
}
schemas[*(schema.ID)] = schema
}
return schema
default:
fmt.Printf("schemaValue: unexpected node %+v\n", jsonData)
return nil
}
return nil
}
//
// BUILDERS
// The following methods build elements of Schemas from interface{} values.
// Each returns nil if it is unable to build the desired element.
//
// Gets the string value of an interface{} value if possible.
func (schema *Schema) stringValue(v *yaml.Node) *string {
switch v.Kind {
case yaml.ScalarNode:
return &v.Value
default:
fmt.Printf("stringValue: unexpected node %+v\n", v)
}
return nil
}
// Gets the numeric value of an interface{} value if possible.
func (schema *Schema) numberValue(v *yaml.Node) *SchemaNumber {
number := &SchemaNumber{}
switch v.Kind {
case yaml.ScalarNode:
switch v.Tag {
case "!!float":
v2, _ := strconv.ParseFloat(v.Value, 64)
number.Float = &v2
return number
case "!!int":
v2, _ := strconv.ParseInt(v.Value, 10, 64)
number.Integer = &v2
return number
default:
fmt.Printf("stringValue: unexpected node %+v\n", v)
}
default:
fmt.Printf("stringValue: unexpected node %+v\n", v)
}
return nil
}
// Gets the integer value of an interface{} value if possible.
func (schema *Schema) intValue(v *yaml.Node) *int64 {
switch v.Kind {
case yaml.ScalarNode:
switch v.Tag {
case "!!float":
v2, _ := strconv.ParseFloat(v.Value, 64)
v3 := int64(v2)
return &v3
case "!!int":
v2, _ := strconv.ParseInt(v.Value, 10, 64)
return &v2
default:
fmt.Printf("intValue: unexpected node %+v\n", v)
}
default:
fmt.Printf("intValue: unexpected node %+v\n", v)
}
return nil
}
// Gets the bool value of an interface{} value if possible.
func (schema *Schema) boolValue(v *yaml.Node) *bool {
switch v.Kind {
case yaml.ScalarNode:
switch v.Tag {
case "!!bool":
v2, _ := strconv.ParseBool(v.Value)
return &v2
default:
fmt.Printf("boolValue: unexpected node %+v\n", v)
}
default:
fmt.Printf("boolValue: unexpected node %+v\n", v)
}
return nil
}
// Gets a map of Schemas from an interface{} value if possible.
func (schema *Schema) mapOfSchemasValue(v *yaml.Node) *[]*NamedSchema {
switch v.Kind {
case yaml.MappingNode:
m := make([]*NamedSchema, 0)
for i := 0; i < len(v.Content); i += 2 {
k2 := v.Content[i].Value
v2 := v.Content[i+1]
pair := &NamedSchema{Name: k2, Value: NewSchemaFromObject(v2)}
m = append(m, pair)
}
return &m
default:
fmt.Printf("mapOfSchemasValue: unexpected node %+v\n", v)
}
return nil
}
// Gets an array of Schemas from an interface{} value if possible.
func (schema *Schema) arrayOfSchemasValue(v *yaml.Node) *[]*Schema {
switch v.Kind {
case yaml.SequenceNode:
m := make([]*Schema, 0)
for _, v2 := range v.Content {
switch v2.Kind {
case yaml.MappingNode:
s := NewSchemaFromObject(v2)
m = append(m, s)
default:
fmt.Printf("arrayOfSchemasValue: unexpected node %+v\n", v2)
}
}
return &m
case yaml.MappingNode:
m := make([]*Schema, 0)
s := NewSchemaFromObject(v)
m = append(m, s)
return &m
default:
fmt.Printf("arrayOfSchemasValue: unexpected node %+v\n", v)
}
return nil
}
// Gets a Schema or an array of Schemas from an interface{} value if possible.
func (schema *Schema) schemaOrSchemaArrayValue(v *yaml.Node) *SchemaOrSchemaArray {
switch v.Kind {
case yaml.SequenceNode:
m := make([]*Schema, 0)
for _, v2 := range v.Content {
switch v2.Kind {
case yaml.MappingNode:
s := NewSchemaFromObject(v2)
m = append(m, s)
default:
fmt.Printf("schemaOrSchemaArrayValue: unexpected node %+v\n", v2)
}
}
return &SchemaOrSchemaArray{SchemaArray: &m}
case yaml.MappingNode:
s := NewSchemaFromObject(v)
return &SchemaOrSchemaArray{Schema: s}
default:
fmt.Printf("schemaOrSchemaArrayValue: unexpected node %+v\n", v)
}
return nil
}
// Gets an array of strings from an interface{} value if possible.
func (schema *Schema) arrayOfStringsValue(v *yaml.Node) *[]string {
switch v.Kind {
case yaml.ScalarNode:
a := []string{v.Value}
return &a
case yaml.SequenceNode:
a := make([]string, 0)
for _, v2 := range v.Content {
switch v2.Kind {
case yaml.ScalarNode:
a = append(a, v2.Value)
default:
fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v2)
}
}
return &a
default:
fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v)
}
return nil
}
// Gets a string or an array of strings from an interface{} value if possible.
func (schema *Schema) stringOrStringArrayValue(v *yaml.Node) *StringOrStringArray {
switch v.Kind {
case yaml.ScalarNode:
s := &StringOrStringArray{}
s.String = &v.Value
return s
case yaml.SequenceNode:
a := make([]string, 0)
for _, v2 := range v.Content {
switch v2.Kind {
case yaml.ScalarNode:
a = append(a, v2.Value)
default:
fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v2)
}
}
s := &StringOrStringArray{}
s.StringArray = &a
return s
default:
fmt.Printf("arrayOfStringsValue: unexpected node %+v\n", v)
}
return nil
}
// Gets an array of enum values from an interface{} value if possible.
func (schema *Schema) arrayOfEnumValuesValue(v *yaml.Node) *[]SchemaEnumValue {
a := make([]SchemaEnumValue, 0)
switch v.Kind {
case yaml.SequenceNode:
for _, v2 := range v.Content {
switch v2.Kind {
case yaml.ScalarNode:
switch v2.Tag {
case "!!str":
a = append(a, SchemaEnumValue{String: &v2.Value})
case "!!bool":
v3, _ := strconv.ParseBool(v2.Value)
a = append(a, SchemaEnumValue{Bool: &v3})
default:
fmt.Printf("arrayOfEnumValuesValue: unexpected type %s\n", v2.Tag)
}
default:
fmt.Printf("arrayOfEnumValuesValue: unexpected node %+v\n", v2)
}
}
default:
fmt.Printf("arrayOfEnumValuesValue: unexpected node %+v\n", v)
}
return &a
}
// Gets a map of schemas or string arrays from an interface{} value if possible.
func (schema *Schema) mapOfSchemasOrStringArraysValue(v *yaml.Node) *[]*NamedSchemaOrStringArray {
m := make([]*NamedSchemaOrStringArray, 0)
switch v.Kind {
case yaml.MappingNode:
for i := 0; i < len(v.Content); i += 2 {
k2 := v.Content[i].Value
v2 := v.Content[i+1]
switch v2.Kind {
case yaml.SequenceNode:
a := make([]string, 0)
for _, v3 := range v2.Content {
switch v3.Kind {
case yaml.ScalarNode:
a = append(a, v3.Value)
default:
fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v3)
}
}
s := &SchemaOrStringArray{}
s.StringArray = &a
pair := &NamedSchemaOrStringArray{Name: k2, Value: s}
m = append(m, pair)
default:
fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v2)
}
}
default:
fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected node %+v\n", v)
}
return &m
}
// Gets a schema or a boolean value from an interface{} value if possible.
func (schema *Schema) schemaOrBooleanValue(v *yaml.Node) *SchemaOrBoolean {
schemaOrBoolean := &SchemaOrBoolean{}
switch v.Kind {
case yaml.ScalarNode:
v2, _ := strconv.ParseBool(v.Value)
schemaOrBoolean.Boolean = &v2
case yaml.MappingNode:
schemaOrBoolean.Schema = NewSchemaFromObject(v)
default:
fmt.Printf("schemaOrBooleanValue: unexpected node %+v\n", v)
}
return schemaOrBoolean
}
gnostic-models-0.6.8/jsonschema/schema.json 0000664 0000000 0000000 00000010427 14225377162 0020756 0 ustar 00root root 0000000 0000000 {
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"positiveInteger": {
"type": "integer",
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"uniqueItems": true
}
},
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri"
},
"$schema": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {},
"multipleOf": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "boolean",
"default": false
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "boolean",
"default": false
},
"maxLength": { "$ref": "#/definitions/positiveInteger" },
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/positiveInteger" },
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
},
"default": {}
}
gnostic-models-0.6.8/jsonschema/writer.go 0000664 0000000 0000000 00000024250 14225377162 0020465 0 ustar 00root root 0000000 0000000 // Copyright 2017 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.
package jsonschema
import (
"fmt"
"gopkg.in/yaml.v3"
)
const indentation = " "
func renderMappingNode(node *yaml.Node, indent string) (result string) {
result = "{\n"
innerIndent := indent + indentation
for i := 0; i < len(node.Content); i += 2 {
// first print the key
key := node.Content[i].Value
result += fmt.Sprintf("%s\"%+v\": ", innerIndent, key)
// then the value
value := node.Content[i+1]
switch value.Kind {
case yaml.ScalarNode:
result += "\"" + value.Value + "\""
case yaml.MappingNode:
result += renderMappingNode(value, innerIndent)
case yaml.SequenceNode:
result += renderSequenceNode(value, innerIndent)
default:
result += fmt.Sprintf("???MapItem(Key:%+v, Value:%T)", value, value)
}
if i < len(node.Content)-2 {
result += ","
}
result += "\n"
}
result += indent + "}"
return result
}
func renderSequenceNode(node *yaml.Node, indent string) (result string) {
result = "[\n"
innerIndent := indent + indentation
for i := 0; i < len(node.Content); i++ {
item := node.Content[i]
switch item.Kind {
case yaml.ScalarNode:
result += innerIndent + "\"" + item.Value + "\""
case yaml.MappingNode:
result += innerIndent + renderMappingNode(item, innerIndent) + ""
default:
result += innerIndent + fmt.Sprintf("???ArrayItem(%+v)", item)
}
if i < len(node.Content)-1 {
result += ","
}
result += "\n"
}
result += indent + "]"
return result
}
func renderStringArray(array []string, indent string) (result string) {
result = "[\n"
innerIndent := indent + indentation
for i, item := range array {
result += innerIndent + "\"" + item + "\""
if i < len(array)-1 {
result += ","
}
result += "\n"
}
result += indent + "]"
return result
}
// Render renders a yaml.Node as JSON
func Render(node *yaml.Node) string {
if node.Kind == yaml.DocumentNode {
if len(node.Content) == 1 {
return Render(node.Content[0])
}
} else if node.Kind == yaml.MappingNode {
return renderMappingNode(node, "") + "\n"
} else if node.Kind == yaml.SequenceNode {
return renderSequenceNode(node, "") + "\n"
}
return ""
}
func (object *SchemaNumber) nodeValue() *yaml.Node {
if object.Integer != nil {
return nodeForInt64(*object.Integer)
} else if object.Float != nil {
return nodeForFloat64(*object.Float)
} else {
return nil
}
}
func (object *SchemaOrBoolean) nodeValue() *yaml.Node {
if object.Schema != nil {
return object.Schema.nodeValue()
} else if object.Boolean != nil {
return nodeForBoolean(*object.Boolean)
} else {
return nil
}
}
func nodeForStringArray(array []string) *yaml.Node {
content := make([]*yaml.Node, 0)
for _, item := range array {
content = append(content, nodeForString(item))
}
return nodeForSequence(content)
}
func nodeForSchemaArray(array []*Schema) *yaml.Node {
content := make([]*yaml.Node, 0)
for _, item := range array {
content = append(content, item.nodeValue())
}
return nodeForSequence(content)
}
func (object *StringOrStringArray) nodeValue() *yaml.Node {
if object.String != nil {
return nodeForString(*object.String)
} else if object.StringArray != nil {
return nodeForStringArray(*(object.StringArray))
} else {
return nil
}
}
func (object *SchemaOrStringArray) nodeValue() *yaml.Node {
if object.Schema != nil {
return object.Schema.nodeValue()
} else if object.StringArray != nil {
return nodeForStringArray(*(object.StringArray))
} else {
return nil
}
}
func (object *SchemaOrSchemaArray) nodeValue() *yaml.Node {
if object.Schema != nil {
return object.Schema.nodeValue()
} else if object.SchemaArray != nil {
return nodeForSchemaArray(*(object.SchemaArray))
} else {
return nil
}
}
func (object *SchemaEnumValue) nodeValue() *yaml.Node {
if object.String != nil {
return nodeForString(*object.String)
} else if object.Bool != nil {
return nodeForBoolean(*object.Bool)
} else {
return nil
}
}
func nodeForNamedSchemaArray(array *[]*NamedSchema) *yaml.Node {
content := make([]*yaml.Node, 0)
for _, pair := range *(array) {
content = appendPair(content, pair.Name, pair.Value.nodeValue())
}
return nodeForMapping(content)
}
func nodeForNamedSchemaOrStringArray(array *[]*NamedSchemaOrStringArray) *yaml.Node {
content := make([]*yaml.Node, 0)
for _, pair := range *(array) {
content = appendPair(content, pair.Name, pair.Value.nodeValue())
}
return nodeForMapping(content)
}
func nodeForSchemaEnumArray(array *[]SchemaEnumValue) *yaml.Node {
content := make([]*yaml.Node, 0)
for _, item := range *array {
content = append(content, item.nodeValue())
}
return nodeForSequence(content)
}
func nodeForMapping(content []*yaml.Node) *yaml.Node {
return &yaml.Node{
Kind: yaml.MappingNode,
Content: content,
}
}
func nodeForSequence(content []*yaml.Node) *yaml.Node {
return &yaml.Node{
Kind: yaml.SequenceNode,
Content: content,
}
}
func nodeForString(value string) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!str",
Value: value,
}
}
func nodeForBoolean(value bool) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!bool",
Value: fmt.Sprintf("%t", value),
}
}
func nodeForInt64(value int64) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!int",
Value: fmt.Sprintf("%d", value),
}
}
func nodeForFloat64(value float64) *yaml.Node {
return &yaml.Node{
Kind: yaml.ScalarNode,
Tag: "!!float",
Value: fmt.Sprintf("%f", value),
}
}
func appendPair(nodes []*yaml.Node, name string, value *yaml.Node) []*yaml.Node {
nodes = append(nodes, nodeForString(name))
nodes = append(nodes, value)
return nodes
}
func (schema *Schema) nodeValue() *yaml.Node {
n := &yaml.Node{Kind: yaml.MappingNode}
content := make([]*yaml.Node, 0)
if schema.Title != nil {
content = appendPair(content, "title", nodeForString(*schema.Title))
}
if schema.ID != nil {
content = appendPair(content, "id", nodeForString(*schema.ID))
}
if schema.Schema != nil {
content = appendPair(content, "$schema", nodeForString(*schema.Schema))
}
if schema.Type != nil {
content = appendPair(content, "type", schema.Type.nodeValue())
}
if schema.Items != nil {
content = appendPair(content, "items", schema.Items.nodeValue())
}
if schema.Description != nil {
content = appendPair(content, "description", nodeForString(*schema.Description))
}
if schema.Required != nil {
content = appendPair(content, "required", nodeForStringArray(*schema.Required))
}
if schema.AdditionalProperties != nil {
content = appendPair(content, "additionalProperties", schema.AdditionalProperties.nodeValue())
}
if schema.PatternProperties != nil {
content = appendPair(content, "patternProperties", nodeForNamedSchemaArray(schema.PatternProperties))
}
if schema.Properties != nil {
content = appendPair(content, "properties", nodeForNamedSchemaArray(schema.Properties))
}
if schema.Dependencies != nil {
content = appendPair(content, "dependencies", nodeForNamedSchemaOrStringArray(schema.Dependencies))
}
if schema.Ref != nil {
content = appendPair(content, "$ref", nodeForString(*schema.Ref))
}
if schema.MultipleOf != nil {
content = appendPair(content, "multipleOf", schema.MultipleOf.nodeValue())
}
if schema.Maximum != nil {
content = appendPair(content, "maximum", schema.Maximum.nodeValue())
}
if schema.ExclusiveMaximum != nil {
content = appendPair(content, "exclusiveMaximum", nodeForBoolean(*schema.ExclusiveMaximum))
}
if schema.Minimum != nil {
content = appendPair(content, "minimum", schema.Minimum.nodeValue())
}
if schema.ExclusiveMinimum != nil {
content = appendPair(content, "exclusiveMinimum", nodeForBoolean(*schema.ExclusiveMinimum))
}
if schema.MaxLength != nil {
content = appendPair(content, "maxLength", nodeForInt64(*schema.MaxLength))
}
if schema.MinLength != nil {
content = appendPair(content, "minLength", nodeForInt64(*schema.MinLength))
}
if schema.Pattern != nil {
content = appendPair(content, "pattern", nodeForString(*schema.Pattern))
}
if schema.AdditionalItems != nil {
content = appendPair(content, "additionalItems", schema.AdditionalItems.nodeValue())
}
if schema.MaxItems != nil {
content = appendPair(content, "maxItems", nodeForInt64(*schema.MaxItems))
}
if schema.MinItems != nil {
content = appendPair(content, "minItems", nodeForInt64(*schema.MinItems))
}
if schema.UniqueItems != nil {
content = appendPair(content, "uniqueItems", nodeForBoolean(*schema.UniqueItems))
}
if schema.MaxProperties != nil {
content = appendPair(content, "maxProperties", nodeForInt64(*schema.MaxProperties))
}
if schema.MinProperties != nil {
content = appendPair(content, "minProperties", nodeForInt64(*schema.MinProperties))
}
if schema.Enumeration != nil {
content = appendPair(content, "enum", nodeForSchemaEnumArray(schema.Enumeration))
}
if schema.AllOf != nil {
content = appendPair(content, "allOf", nodeForSchemaArray(*schema.AllOf))
}
if schema.AnyOf != nil {
content = appendPair(content, "anyOf", nodeForSchemaArray(*schema.AnyOf))
}
if schema.OneOf != nil {
content = appendPair(content, "oneOf", nodeForSchemaArray(*schema.OneOf))
}
if schema.Not != nil {
content = appendPair(content, "not", schema.Not.nodeValue())
}
if schema.Definitions != nil {
content = appendPair(content, "definitions", nodeForNamedSchemaArray(schema.Definitions))
}
if schema.Default != nil {
// m = append(m, yaml.MapItem{Key: "default", Value: *schema.Default})
}
if schema.Format != nil {
content = appendPair(content, "format", nodeForString(*schema.Format))
}
n.Content = content
return n
}
// JSONString returns a json representation of a schema.
func (schema *Schema) JSONString() string {
node := schema.nodeValue()
return Render(node)
}
gnostic-models-0.6.8/openapiv2/ 0000775 0000000 0000000 00000000000 14225377162 0016370 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/openapiv2/OpenAPIv2.go 0000664 0000000 0000000 00001131177 14225377162 0020435 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
package openapi_v2
import (
"fmt"
"regexp"
"strings"
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/compiler"
)
// Version returns the package name (and OpenAPI version).
func Version() string {
return "openapi_v2"
}
// NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not.
func NewAdditionalPropertiesItem(in *yaml.Node, context *compiler.Context) (*AdditionalPropertiesItem, error) {
errors := make([]error, 0)
x := &AdditionalPropertiesItem{}
matched := false
// Schema schema = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewSchema(m, compiler.NewContext("schema", m, context))
if matchingError == nil {
x.Oneof = &AdditionalPropertiesItem_Schema{Schema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// bool boolean = 2;
boolValue, ok := compiler.BoolForScalarNode(in)
if ok {
x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue}
matched = true
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid AdditionalPropertiesItem")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewAny creates an object of type Any if possible, returning an error if not.
func NewAny(in *yaml.Node, context *compiler.Context) (*Any, error) {
errors := make([]error, 0)
x := &Any{}
bytes := compiler.Marshal(in)
x.Yaml = string(bytes)
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewApiKeySecurity creates an object of type ApiKeySecurity if possible, returning an error if not.
func NewApiKeySecurity(in *yaml.Node, context *compiler.Context) (*ApiKeySecurity, error) {
errors := make([]error, 0)
x := &ApiKeySecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"in", "name", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "in", "name", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [apiKey]
if ok && !compiler.StringArrayContainsValue([]string{"apiKey"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 2;
v2 := compiler.MapValueForKey(m, "name")
if v2 != nil {
x.Name, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 3;
v3 := compiler.MapValueForKey(m, "in")
if v3 != nil {
x.In, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [header query]
if ok && !compiler.StringArrayContainsValue([]string{"header", "query"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 4;
v4 := compiler.MapValueForKey(m, "description")
if v4 != nil {
x.Description, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 5;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewBasicAuthenticationSecurity creates an object of type BasicAuthenticationSecurity if possible, returning an error if not.
func NewBasicAuthenticationSecurity(in *yaml.Node, context *compiler.Context) (*BasicAuthenticationSecurity, error) {
errors := make([]error, 0)
x := &BasicAuthenticationSecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [basic]
if ok && !compiler.StringArrayContainsValue([]string{"basic"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 3;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewBodyParameter creates an object of type BodyParameter if possible, returning an error if not.
func NewBodyParameter(in *yaml.Node, context *compiler.Context) (*BodyParameter, error) {
errors := make([]error, 0)
x := &BodyParameter{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"in", "name", "schema"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "in", "name", "required", "schema"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 2;
v2 := compiler.MapValueForKey(m, "name")
if v2 != nil {
x.Name, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 3;
v3 := compiler.MapValueForKey(m, "in")
if v3 != nil {
x.In, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [body]
if ok && !compiler.StringArrayContainsValue([]string{"body"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool required = 4;
v4 := compiler.MapValueForKey(m, "required")
if v4 != nil {
x.Required, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schema schema = 5;
v5 := compiler.MapValueForKey(m, "schema")
if v5 != nil {
var err error
x.Schema, err = NewSchema(v5, compiler.NewContext("schema", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 6;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewContact creates an object of type Contact if possible, returning an error if not.
func NewContact(in *yaml.Node, context *compiler.Context) (*Contact, error) {
errors := make([]error, 0)
x := &Contact{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"email", "name", "url"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string email = 3;
v3 := compiler.MapValueForKey(m, "email")
if v3 != nil {
x.Email, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for email: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 4;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDefault creates an object of type Default if possible, returning an error if not.
func NewDefault(in *yaml.Node, context *compiler.Context) (*Default, error) {
errors := make([]error, 0)
x := &Default{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedAny additional_properties = 1;
// MAP: Any
x.AdditionalProperties = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDefinitions creates an object of type Definitions if possible, returning an error if not.
func NewDefinitions(in *yaml.Node, context *compiler.Context) (*Definitions, error) {
errors := make([]error, 0)
x := &Definitions{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSchema additional_properties = 1;
// MAP: Schema
x.AdditionalProperties = make([]*NamedSchema, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSchema{}
pair.Name = k
var err error
pair.Value, err = NewSchema(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDocument creates an object of type Document if possible, returning an error if not.
func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error) {
errors := make([]error, 0)
x := &Document{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"info", "paths", "swagger"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"basePath", "consumes", "definitions", "externalDocs", "host", "info", "parameters", "paths", "produces", "responses", "schemes", "security", "securityDefinitions", "swagger", "tags"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string swagger = 1;
v1 := compiler.MapValueForKey(m, "swagger")
if v1 != nil {
x.Swagger, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for swagger: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [2.0]
if ok && !compiler.StringArrayContainsValue([]string{"2.0"}, x.Swagger) {
message := fmt.Sprintf("has unexpected value for swagger: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Info info = 2;
v2 := compiler.MapValueForKey(m, "info")
if v2 != nil {
var err error
x.Info, err = NewInfo(v2, compiler.NewContext("info", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// string host = 3;
v3 := compiler.MapValueForKey(m, "host")
if v3 != nil {
x.Host, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for host: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string base_path = 4;
v4 := compiler.MapValueForKey(m, "basePath")
if v4 != nil {
x.BasePath, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for basePath: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string schemes = 5;
v5 := compiler.MapValueForKey(m, "schemes")
if v5 != nil {
v, ok := compiler.SequenceNodeForNode(v5)
if ok {
x.Schemes = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [http https ws wss]
if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) {
message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string consumes = 6;
v6 := compiler.MapValueForKey(m, "consumes")
if v6 != nil {
v, ok := compiler.SequenceNodeForNode(v6)
if ok {
x.Consumes = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for consumes: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string produces = 7;
v7 := compiler.MapValueForKey(m, "produces")
if v7 != nil {
v, ok := compiler.SequenceNodeForNode(v7)
if ok {
x.Produces = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for produces: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// Paths paths = 8;
v8 := compiler.MapValueForKey(m, "paths")
if v8 != nil {
var err error
x.Paths, err = NewPaths(v8, compiler.NewContext("paths", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// Definitions definitions = 9;
v9 := compiler.MapValueForKey(m, "definitions")
if v9 != nil {
var err error
x.Definitions, err = NewDefinitions(v9, compiler.NewContext("definitions", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// ParameterDefinitions parameters = 10;
v10 := compiler.MapValueForKey(m, "parameters")
if v10 != nil {
var err error
x.Parameters, err = NewParameterDefinitions(v10, compiler.NewContext("parameters", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// ResponseDefinitions responses = 11;
v11 := compiler.MapValueForKey(m, "responses")
if v11 != nil {
var err error
x.Responses, err = NewResponseDefinitions(v11, compiler.NewContext("responses", v11, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated SecurityRequirement security = 12;
v12 := compiler.MapValueForKey(m, "security")
if v12 != nil {
// repeated SecurityRequirement
x.Security = make([]*SecurityRequirement, 0)
a, ok := compiler.SequenceNodeForNode(v12)
if ok {
for _, item := range a.Content {
y, err := NewSecurityRequirement(item, compiler.NewContext("security", item, context))
if err != nil {
errors = append(errors, err)
}
x.Security = append(x.Security, y)
}
}
}
// SecurityDefinitions security_definitions = 13;
v13 := compiler.MapValueForKey(m, "securityDefinitions")
if v13 != nil {
var err error
x.SecurityDefinitions, err = NewSecurityDefinitions(v13, compiler.NewContext("securityDefinitions", v13, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated Tag tags = 14;
v14 := compiler.MapValueForKey(m, "tags")
if v14 != nil {
// repeated Tag
x.Tags = make([]*Tag, 0)
a, ok := compiler.SequenceNodeForNode(v14)
if ok {
for _, item := range a.Content {
y, err := NewTag(item, compiler.NewContext("tags", item, context))
if err != nil {
errors = append(errors, err)
}
x.Tags = append(x.Tags, y)
}
}
}
// ExternalDocs external_docs = 15;
v15 := compiler.MapValueForKey(m, "externalDocs")
if v15 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v15, compiler.NewContext("externalDocs", v15, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 16;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExamples creates an object of type Examples if possible, returning an error if not.
func NewExamples(in *yaml.Node, context *compiler.Context) (*Examples, error) {
errors := make([]error, 0)
x := &Examples{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedAny additional_properties = 1;
// MAP: Any
x.AdditionalProperties = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not.
func NewExternalDocs(in *yaml.Node, context *compiler.Context) (*ExternalDocs, error) {
errors := make([]error, 0)
x := &ExternalDocs{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"url"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "url"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 3;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewFileSchema creates an object of type FileSchema if possible, returning an error if not.
func NewFileSchema(in *yaml.Node, context *compiler.Context) (*FileSchema, error) {
errors := make([]error, 0)
x := &FileSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"default", "description", "example", "externalDocs", "format", "readOnly", "required", "title", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string format = 1;
v1 := compiler.MapValueForKey(m, "format")
if v1 != nil {
x.Format, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string title = 2;
v2 := compiler.MapValueForKey(m, "title")
if v2 != nil {
x.Title, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 4;
v4 := compiler.MapValueForKey(m, "default")
if v4 != nil {
var err error
x.Default, err = NewAny(v4, compiler.NewContext("default", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated string required = 5;
v5 := compiler.MapValueForKey(m, "required")
if v5 != nil {
v, ok := compiler.SequenceNodeForNode(v5)
if ok {
x.Required = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 6;
v6 := compiler.MapValueForKey(m, "type")
if v6 != nil {
x.Type, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [file]
if ok && !compiler.StringArrayContainsValue([]string{"file"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool read_only = 7;
v7 := compiler.MapValueForKey(m, "readOnly")
if v7 != nil {
x.ReadOnly, ok = compiler.BoolForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExternalDocs external_docs = 8;
v8 := compiler.MapValueForKey(m, "externalDocs")
if v8 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v8, compiler.NewContext("externalDocs", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 9;
v9 := compiler.MapValueForKey(m, "example")
if v9 != nil {
var err error
x.Example, err = NewAny(v9, compiler.NewContext("example", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 10;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewFormDataParameterSubSchema creates an object of type FormDataParameterSubSchema if possible, returning an error if not.
func NewFormDataParameterSubSchema(in *yaml.Node, context *compiler.Context) (*FormDataParameterSubSchema, error) {
errors := make([]error, 0)
x := &FormDataParameterSubSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool required = 1;
v1 := compiler.MapValueForKey(m, "required")
if v1 != nil {
x.Required, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 2;
v2 := compiler.MapValueForKey(m, "in")
if v2 != nil {
x.In, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [formData]
if ok && !compiler.StringArrayContainsValue([]string{"formData"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 4;
v4 := compiler.MapValueForKey(m, "name")
if v4 != nil {
x.Name, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_empty_value = 5;
v5 := compiler.MapValueForKey(m, "allowEmptyValue")
if v5 != nil {
x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 6;
v6 := compiler.MapValueForKey(m, "type")
if v6 != nil {
x.Type, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number boolean integer array file]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array", "file"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 7;
v7 := compiler.MapValueForKey(m, "format")
if v7 != nil {
x.Format, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 8;
v8 := compiler.MapValueForKey(m, "items")
if v8 != nil {
var err error
x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 9;
v9 := compiler.MapValueForKey(m, "collectionFormat")
if v9 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes multi]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 10;
v10 := compiler.MapValueForKey(m, "default")
if v10 != nil {
var err error
x.Default, err = NewAny(v10, compiler.NewContext("default", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 11;
v11 := compiler.MapValueForKey(m, "maximum")
if v11 != nil {
v, ok := compiler.FloatForScalarNode(v11)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 12;
v12 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v12 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 13;
v13 := compiler.MapValueForKey(m, "minimum")
if v13 != nil {
v, ok := compiler.FloatForScalarNode(v13)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 14;
v14 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v14 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 15;
v15 := compiler.MapValueForKey(m, "maxLength")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 16;
v16 := compiler.MapValueForKey(m, "minLength")
if v16 != nil {
t, ok := compiler.IntForScalarNode(v16)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 17;
v17 := compiler.MapValueForKey(m, "pattern")
if v17 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 18;
v18 := compiler.MapValueForKey(m, "maxItems")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 19;
v19 := compiler.MapValueForKey(m, "minItems")
if v19 != nil {
t, ok := compiler.IntForScalarNode(v19)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 20;
v20 := compiler.MapValueForKey(m, "uniqueItems")
if v20 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v20)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v20))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 21;
v21 := compiler.MapValueForKey(m, "enum")
if v21 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v21)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 22;
v22 := compiler.MapValueForKey(m, "multipleOf")
if v22 != nil {
v, ok := compiler.FloatForScalarNode(v22)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v22))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 23;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeader creates an object of type Header if possible, returning an error if not.
func NewHeader(in *yaml.Node, context *compiler.Context) (*Header, error) {
errors := make([]error, 0)
x := &Header{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number integer boolean array]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 2;
v2 := compiler.MapValueForKey(m, "format")
if v2 != nil {
x.Format, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 3;
v3 := compiler.MapValueForKey(m, "items")
if v3 != nil {
var err error
x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 4;
v4 := compiler.MapValueForKey(m, "collectionFormat")
if v4 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 5;
v5 := compiler.MapValueForKey(m, "default")
if v5 != nil {
var err error
x.Default, err = NewAny(v5, compiler.NewContext("default", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 6;
v6 := compiler.MapValueForKey(m, "maximum")
if v6 != nil {
v, ok := compiler.FloatForScalarNode(v6)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 7;
v7 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v7 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 8;
v8 := compiler.MapValueForKey(m, "minimum")
if v8 != nil {
v, ok := compiler.FloatForScalarNode(v8)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 9;
v9 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v9 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 10;
v10 := compiler.MapValueForKey(m, "maxLength")
if v10 != nil {
t, ok := compiler.IntForScalarNode(v10)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 11;
v11 := compiler.MapValueForKey(m, "minLength")
if v11 != nil {
t, ok := compiler.IntForScalarNode(v11)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 12;
v12 := compiler.MapValueForKey(m, "pattern")
if v12 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 13;
v13 := compiler.MapValueForKey(m, "maxItems")
if v13 != nil {
t, ok := compiler.IntForScalarNode(v13)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 14;
v14 := compiler.MapValueForKey(m, "minItems")
if v14 != nil {
t, ok := compiler.IntForScalarNode(v14)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 15;
v15 := compiler.MapValueForKey(m, "uniqueItems")
if v15 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v15)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 16;
v16 := compiler.MapValueForKey(m, "enum")
if v16 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v16)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 17;
v17 := compiler.MapValueForKey(m, "multipleOf")
if v17 != nil {
v, ok := compiler.FloatForScalarNode(v17)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 18;
v18 := compiler.MapValueForKey(m, "description")
if v18 != nil {
x.Description, ok = compiler.StringForScalarNode(v18)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 19;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeaderParameterSubSchema creates an object of type HeaderParameterSubSchema if possible, returning an error if not.
func NewHeaderParameterSubSchema(in *yaml.Node, context *compiler.Context) (*HeaderParameterSubSchema, error) {
errors := make([]error, 0)
x := &HeaderParameterSubSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool required = 1;
v1 := compiler.MapValueForKey(m, "required")
if v1 != nil {
x.Required, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 2;
v2 := compiler.MapValueForKey(m, "in")
if v2 != nil {
x.In, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [header]
if ok && !compiler.StringArrayContainsValue([]string{"header"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 4;
v4 := compiler.MapValueForKey(m, "name")
if v4 != nil {
x.Name, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 5;
v5 := compiler.MapValueForKey(m, "type")
if v5 != nil {
x.Type, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number boolean integer array]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 6;
v6 := compiler.MapValueForKey(m, "format")
if v6 != nil {
x.Format, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 7;
v7 := compiler.MapValueForKey(m, "items")
if v7 != nil {
var err error
x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 8;
v8 := compiler.MapValueForKey(m, "collectionFormat")
if v8 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 9;
v9 := compiler.MapValueForKey(m, "default")
if v9 != nil {
var err error
x.Default, err = NewAny(v9, compiler.NewContext("default", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 10;
v10 := compiler.MapValueForKey(m, "maximum")
if v10 != nil {
v, ok := compiler.FloatForScalarNode(v10)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 11;
v11 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v11 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v11)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 12;
v12 := compiler.MapValueForKey(m, "minimum")
if v12 != nil {
v, ok := compiler.FloatForScalarNode(v12)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 13;
v13 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v13 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 14;
v14 := compiler.MapValueForKey(m, "maxLength")
if v14 != nil {
t, ok := compiler.IntForScalarNode(v14)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 15;
v15 := compiler.MapValueForKey(m, "minLength")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 16;
v16 := compiler.MapValueForKey(m, "pattern")
if v16 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v16)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 17;
v17 := compiler.MapValueForKey(m, "maxItems")
if v17 != nil {
t, ok := compiler.IntForScalarNode(v17)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 18;
v18 := compiler.MapValueForKey(m, "minItems")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 19;
v19 := compiler.MapValueForKey(m, "uniqueItems")
if v19 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v19)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 20;
v20 := compiler.MapValueForKey(m, "enum")
if v20 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v20)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 21;
v21 := compiler.MapValueForKey(m, "multipleOf")
if v21 != nil {
v, ok := compiler.FloatForScalarNode(v21)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v21))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 22;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeaders creates an object of type Headers if possible, returning an error if not.
func NewHeaders(in *yaml.Node, context *compiler.Context) (*Headers, error) {
errors := make([]error, 0)
x := &Headers{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedHeader additional_properties = 1;
// MAP: Header
x.AdditionalProperties = make([]*NamedHeader, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedHeader{}
pair.Name = k
var err error
pair.Value, err = NewHeader(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewInfo creates an object of type Info if possible, returning an error if not.
func NewInfo(in *yaml.Node, context *compiler.Context) (*Info, error) {
errors := make([]error, 0)
x := &Info{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"title", "version"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"contact", "description", "license", "termsOfService", "title", "version"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string title = 1;
v1 := compiler.MapValueForKey(m, "title")
if v1 != nil {
x.Title, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string version = 2;
v2 := compiler.MapValueForKey(m, "version")
if v2 != nil {
x.Version, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for version: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string terms_of_service = 4;
v4 := compiler.MapValueForKey(m, "termsOfService")
if v4 != nil {
x.TermsOfService, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for termsOfService: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Contact contact = 5;
v5 := compiler.MapValueForKey(m, "contact")
if v5 != nil {
var err error
x.Contact, err = NewContact(v5, compiler.NewContext("contact", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// License license = 6;
v6 := compiler.MapValueForKey(m, "license")
if v6 != nil {
var err error
x.License, err = NewLicense(v6, compiler.NewContext("license", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 7;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewItemsItem creates an object of type ItemsItem if possible, returning an error if not.
func NewItemsItem(in *yaml.Node, context *compiler.Context) (*ItemsItem, error) {
errors := make([]error, 0)
x := &ItemsItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
x.Schema = make([]*Schema, 0)
y, err := NewSchema(m, compiler.NewContext("", m, context))
if err != nil {
return nil, err
}
x.Schema = append(x.Schema, y)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewJsonReference creates an object of type JsonReference if possible, returning an error if not.
func NewJsonReference(in *yaml.Node, context *compiler.Context) (*JsonReference, error) {
errors := make([]error, 0)
x := &JsonReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"$ref"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewLicense creates an object of type License if possible, returning an error if not.
func NewLicense(in *yaml.Node, context *compiler.Context) (*License, error) {
errors := make([]error, 0)
x := &License{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"name"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"name", "url"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 3;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedAny creates an object of type NamedAny if possible, returning an error if not.
func NewNamedAny(in *yaml.Node, context *compiler.Context) (*NamedAny, error) {
errors := make([]error, 0)
x := &NamedAny{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewAny(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedHeader creates an object of type NamedHeader if possible, returning an error if not.
func NewNamedHeader(in *yaml.Node, context *compiler.Context) (*NamedHeader, error) {
errors := make([]error, 0)
x := &NamedHeader{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Header value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewHeader(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not.
func NewNamedParameter(in *yaml.Node, context *compiler.Context) (*NamedParameter, error) {
errors := make([]error, 0)
x := &NamedParameter{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Parameter value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewParameter(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not.
func NewNamedPathItem(in *yaml.Node, context *compiler.Context) (*NamedPathItem, error) {
errors := make([]error, 0)
x := &NamedPathItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// PathItem value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewPathItem(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedResponse creates an object of type NamedResponse if possible, returning an error if not.
func NewNamedResponse(in *yaml.Node, context *compiler.Context) (*NamedResponse, error) {
errors := make([]error, 0)
x := &NamedResponse{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Response value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewResponse(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedResponseValue creates an object of type NamedResponseValue if possible, returning an error if not.
func NewNamedResponseValue(in *yaml.Node, context *compiler.Context) (*NamedResponseValue, error) {
errors := make([]error, 0)
x := &NamedResponseValue{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// ResponseValue value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewResponseValue(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not.
func NewNamedSchema(in *yaml.Node, context *compiler.Context) (*NamedSchema, error) {
errors := make([]error, 0)
x := &NamedSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Schema value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewSchema(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedSecurityDefinitionsItem creates an object of type NamedSecurityDefinitionsItem if possible, returning an error if not.
func NewNamedSecurityDefinitionsItem(in *yaml.Node, context *compiler.Context) (*NamedSecurityDefinitionsItem, error) {
errors := make([]error, 0)
x := &NamedSecurityDefinitionsItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// SecurityDefinitionsItem value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewSecurityDefinitionsItem(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedString creates an object of type NamedString if possible, returning an error if not.
func NewNamedString(in *yaml.Node, context *compiler.Context) (*NamedString, error) {
errors := make([]error, 0)
x := &NamedString{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
x.Value, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for value: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedStringArray creates an object of type NamedStringArray if possible, returning an error if not.
func NewNamedStringArray(in *yaml.Node, context *compiler.Context) (*NamedStringArray, error) {
errors := make([]error, 0)
x := &NamedStringArray{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// StringArray value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewStringArray(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNonBodyParameter creates an object of type NonBodyParameter if possible, returning an error if not.
func NewNonBodyParameter(in *yaml.Node, context *compiler.Context) (*NonBodyParameter, error) {
errors := make([]error, 0)
x := &NonBodyParameter{}
matched := false
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"in", "name", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// HeaderParameterSubSchema header_parameter_sub_schema = 1;
{
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewHeaderParameterSubSchema(m, compiler.NewContext("headerParameterSubSchema", m, context))
if matchingError == nil {
x.Oneof = &NonBodyParameter_HeaderParameterSubSchema{HeaderParameterSubSchema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
// FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
{
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewFormDataParameterSubSchema(m, compiler.NewContext("formDataParameterSubSchema", m, context))
if matchingError == nil {
x.Oneof = &NonBodyParameter_FormDataParameterSubSchema{FormDataParameterSubSchema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
// QueryParameterSubSchema query_parameter_sub_schema = 3;
{
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewQueryParameterSubSchema(m, compiler.NewContext("queryParameterSubSchema", m, context))
if matchingError == nil {
x.Oneof = &NonBodyParameter_QueryParameterSubSchema{QueryParameterSubSchema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
// PathParameterSubSchema path_parameter_sub_schema = 4;
{
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewPathParameterSubSchema(m, compiler.NewContext("pathParameterSubSchema", m, context))
if matchingError == nil {
x.Oneof = &NonBodyParameter_PathParameterSubSchema{PathParameterSubSchema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid NonBodyParameter")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2AccessCodeSecurity creates an object of type Oauth2AccessCodeSecurity if possible, returning an error if not.
func NewOauth2AccessCodeSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2AccessCodeSecurity, error) {
errors := make([]error, 0)
x := &Oauth2AccessCodeSecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"authorizationUrl", "flow", "tokenUrl", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "tokenUrl", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [oauth2]
if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string flow = 2;
v2 := compiler.MapValueForKey(m, "flow")
if v2 != nil {
x.Flow, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [accessCode]
if ok && !compiler.StringArrayContainsValue([]string{"accessCode"}, x.Flow) {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Oauth2Scopes scopes = 3;
v3 := compiler.MapValueForKey(m, "scopes")
if v3 != nil {
var err error
x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string authorization_url = 4;
v4 := compiler.MapValueForKey(m, "authorizationUrl")
if v4 != nil {
x.AuthorizationUrl, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for authorizationUrl: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string token_url = 5;
v5 := compiler.MapValueForKey(m, "tokenUrl")
if v5 != nil {
x.TokenUrl, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 6;
v6 := compiler.MapValueForKey(m, "description")
if v6 != nil {
x.Description, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 7;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2ApplicationSecurity creates an object of type Oauth2ApplicationSecurity if possible, returning an error if not.
func NewOauth2ApplicationSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2ApplicationSecurity, error) {
errors := make([]error, 0)
x := &Oauth2ApplicationSecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"flow", "tokenUrl", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [oauth2]
if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string flow = 2;
v2 := compiler.MapValueForKey(m, "flow")
if v2 != nil {
x.Flow, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [application]
if ok && !compiler.StringArrayContainsValue([]string{"application"}, x.Flow) {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Oauth2Scopes scopes = 3;
v3 := compiler.MapValueForKey(m, "scopes")
if v3 != nil {
var err error
x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string token_url = 4;
v4 := compiler.MapValueForKey(m, "tokenUrl")
if v4 != nil {
x.TokenUrl, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 5;
v5 := compiler.MapValueForKey(m, "description")
if v5 != nil {
x.Description, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 6;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2ImplicitSecurity creates an object of type Oauth2ImplicitSecurity if possible, returning an error if not.
func NewOauth2ImplicitSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2ImplicitSecurity, error) {
errors := make([]error, 0)
x := &Oauth2ImplicitSecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"authorizationUrl", "flow", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [oauth2]
if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string flow = 2;
v2 := compiler.MapValueForKey(m, "flow")
if v2 != nil {
x.Flow, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [implicit]
if ok && !compiler.StringArrayContainsValue([]string{"implicit"}, x.Flow) {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Oauth2Scopes scopes = 3;
v3 := compiler.MapValueForKey(m, "scopes")
if v3 != nil {
var err error
x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string authorization_url = 4;
v4 := compiler.MapValueForKey(m, "authorizationUrl")
if v4 != nil {
x.AuthorizationUrl, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for authorizationUrl: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 5;
v5 := compiler.MapValueForKey(m, "description")
if v5 != nil {
x.Description, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 6;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2PasswordSecurity creates an object of type Oauth2PasswordSecurity if possible, returning an error if not.
func NewOauth2PasswordSecurity(in *yaml.Node, context *compiler.Context) (*Oauth2PasswordSecurity, error) {
errors := make([]error, 0)
x := &Oauth2PasswordSecurity{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"flow", "tokenUrl", "type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [oauth2]
if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string flow = 2;
v2 := compiler.MapValueForKey(m, "flow")
if v2 != nil {
x.Flow, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [password]
if ok && !compiler.StringArrayContainsValue([]string{"password"}, x.Flow) {
message := fmt.Sprintf("has unexpected value for flow: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Oauth2Scopes scopes = 3;
v3 := compiler.MapValueForKey(m, "scopes")
if v3 != nil {
var err error
x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string token_url = 4;
v4 := compiler.MapValueForKey(m, "tokenUrl")
if v4 != nil {
x.TokenUrl, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 5;
v5 := compiler.MapValueForKey(m, "description")
if v5 != nil {
x.Description, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 6;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauth2Scopes creates an object of type Oauth2Scopes if possible, returning an error if not.
func NewOauth2Scopes(in *yaml.Node, context *compiler.Context) (*Oauth2Scopes, error) {
errors := make([]error, 0)
x := &Oauth2Scopes{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedString additional_properties = 1;
// MAP: string
x.AdditionalProperties = make([]*NamedString, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedString{}
pair.Name = k
pair.Value, _ = compiler.StringForScalarNode(v)
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOperation creates an object of type Operation if possible, returning an error if not.
func NewOperation(in *yaml.Node, context *compiler.Context) (*Operation, error) {
errors := make([]error, 0)
x := &Operation{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"responses"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"consumes", "deprecated", "description", "externalDocs", "operationId", "parameters", "produces", "responses", "schemes", "security", "summary", "tags"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated string tags = 1;
v1 := compiler.MapValueForKey(m, "tags")
if v1 != nil {
v, ok := compiler.SequenceNodeForNode(v1)
if ok {
x.Tags = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for tags: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string summary = 2;
v2 := compiler.MapValueForKey(m, "summary")
if v2 != nil {
x.Summary, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExternalDocs external_docs = 4;
v4 := compiler.MapValueForKey(m, "externalDocs")
if v4 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v4, compiler.NewContext("externalDocs", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// string operation_id = 5;
v5 := compiler.MapValueForKey(m, "operationId")
if v5 != nil {
x.OperationId, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for operationId: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string produces = 6;
v6 := compiler.MapValueForKey(m, "produces")
if v6 != nil {
v, ok := compiler.SequenceNodeForNode(v6)
if ok {
x.Produces = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for produces: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string consumes = 7;
v7 := compiler.MapValueForKey(m, "consumes")
if v7 != nil {
v, ok := compiler.SequenceNodeForNode(v7)
if ok {
x.Consumes = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for consumes: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated ParametersItem parameters = 8;
v8 := compiler.MapValueForKey(m, "parameters")
if v8 != nil {
// repeated ParametersItem
x.Parameters = make([]*ParametersItem, 0)
a, ok := compiler.SequenceNodeForNode(v8)
if ok {
for _, item := range a.Content {
y, err := NewParametersItem(item, compiler.NewContext("parameters", item, context))
if err != nil {
errors = append(errors, err)
}
x.Parameters = append(x.Parameters, y)
}
}
}
// Responses responses = 9;
v9 := compiler.MapValueForKey(m, "responses")
if v9 != nil {
var err error
x.Responses, err = NewResponses(v9, compiler.NewContext("responses", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated string schemes = 10;
v10 := compiler.MapValueForKey(m, "schemes")
if v10 != nil {
v, ok := compiler.SequenceNodeForNode(v10)
if ok {
x.Schemes = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [http https ws wss]
if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) {
message := fmt.Sprintf("has unexpected value for schemes: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool deprecated = 11;
v11 := compiler.MapValueForKey(m, "deprecated")
if v11 != nil {
x.Deprecated, ok = compiler.BoolForScalarNode(v11)
if !ok {
message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated SecurityRequirement security = 12;
v12 := compiler.MapValueForKey(m, "security")
if v12 != nil {
// repeated SecurityRequirement
x.Security = make([]*SecurityRequirement, 0)
a, ok := compiler.SequenceNodeForNode(v12)
if ok {
for _, item := range a.Content {
y, err := NewSecurityRequirement(item, compiler.NewContext("security", item, context))
if err != nil {
errors = append(errors, err)
}
x.Security = append(x.Security, y)
}
}
}
// repeated NamedAny vendor_extension = 13;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameter creates an object of type Parameter if possible, returning an error if not.
func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error) {
errors := make([]error, 0)
x := &Parameter{}
matched := false
// BodyParameter body_parameter = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewBodyParameter(m, compiler.NewContext("bodyParameter", m, context))
if matchingError == nil {
x.Oneof = &Parameter_BodyParameter{BodyParameter: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// NonBodyParameter non_body_parameter = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewNonBodyParameter(m, compiler.NewContext("nonBodyParameter", m, context))
if matchingError == nil {
x.Oneof = &Parameter_NonBodyParameter{NonBodyParameter: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid Parameter")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameterDefinitions creates an object of type ParameterDefinitions if possible, returning an error if not.
func NewParameterDefinitions(in *yaml.Node, context *compiler.Context) (*ParameterDefinitions, error) {
errors := make([]error, 0)
x := &ParameterDefinitions{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedParameter additional_properties = 1;
// MAP: Parameter
x.AdditionalProperties = make([]*NamedParameter, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedParameter{}
pair.Name = k
var err error
pair.Value, err = NewParameter(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParametersItem creates an object of type ParametersItem if possible, returning an error if not.
func NewParametersItem(in *yaml.Node, context *compiler.Context) (*ParametersItem, error) {
errors := make([]error, 0)
x := &ParametersItem{}
matched := false
// Parameter parameter = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewParameter(m, compiler.NewContext("parameter", m, context))
if matchingError == nil {
x.Oneof = &ParametersItem_Parameter{Parameter: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// JsonReference json_reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", m, context))
if matchingError == nil {
x.Oneof = &ParametersItem_JsonReference{JsonReference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid ParametersItem")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPathItem creates an object of type PathItem if possible, returning an error if not.
func NewPathItem(in *yaml.Node, context *compiler.Context) (*PathItem, error) {
errors := make([]error, 0)
x := &PathItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "delete", "get", "head", "options", "parameters", "patch", "post", "put"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Operation get = 2;
v2 := compiler.MapValueForKey(m, "get")
if v2 != nil {
var err error
x.Get, err = NewOperation(v2, compiler.NewContext("get", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation put = 3;
v3 := compiler.MapValueForKey(m, "put")
if v3 != nil {
var err error
x.Put, err = NewOperation(v3, compiler.NewContext("put", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation post = 4;
v4 := compiler.MapValueForKey(m, "post")
if v4 != nil {
var err error
x.Post, err = NewOperation(v4, compiler.NewContext("post", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation delete = 5;
v5 := compiler.MapValueForKey(m, "delete")
if v5 != nil {
var err error
x.Delete, err = NewOperation(v5, compiler.NewContext("delete", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation options = 6;
v6 := compiler.MapValueForKey(m, "options")
if v6 != nil {
var err error
x.Options, err = NewOperation(v6, compiler.NewContext("options", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation head = 7;
v7 := compiler.MapValueForKey(m, "head")
if v7 != nil {
var err error
x.Head, err = NewOperation(v7, compiler.NewContext("head", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation patch = 8;
v8 := compiler.MapValueForKey(m, "patch")
if v8 != nil {
var err error
x.Patch, err = NewOperation(v8, compiler.NewContext("patch", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated ParametersItem parameters = 9;
v9 := compiler.MapValueForKey(m, "parameters")
if v9 != nil {
// repeated ParametersItem
x.Parameters = make([]*ParametersItem, 0)
a, ok := compiler.SequenceNodeForNode(v9)
if ok {
for _, item := range a.Content {
y, err := NewParametersItem(item, compiler.NewContext("parameters", item, context))
if err != nil {
errors = append(errors, err)
}
x.Parameters = append(x.Parameters, y)
}
}
}
// repeated NamedAny vendor_extension = 10;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPathParameterSubSchema creates an object of type PathParameterSubSchema if possible, returning an error if not.
func NewPathParameterSubSchema(in *yaml.Node, context *compiler.Context) (*PathParameterSubSchema, error) {
errors := make([]error, 0)
x := &PathParameterSubSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"required"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool required = 1;
v1 := compiler.MapValueForKey(m, "required")
if v1 != nil {
x.Required, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 2;
v2 := compiler.MapValueForKey(m, "in")
if v2 != nil {
x.In, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [path]
if ok && !compiler.StringArrayContainsValue([]string{"path"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 4;
v4 := compiler.MapValueForKey(m, "name")
if v4 != nil {
x.Name, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 5;
v5 := compiler.MapValueForKey(m, "type")
if v5 != nil {
x.Type, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number boolean integer array]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 6;
v6 := compiler.MapValueForKey(m, "format")
if v6 != nil {
x.Format, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 7;
v7 := compiler.MapValueForKey(m, "items")
if v7 != nil {
var err error
x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 8;
v8 := compiler.MapValueForKey(m, "collectionFormat")
if v8 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 9;
v9 := compiler.MapValueForKey(m, "default")
if v9 != nil {
var err error
x.Default, err = NewAny(v9, compiler.NewContext("default", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 10;
v10 := compiler.MapValueForKey(m, "maximum")
if v10 != nil {
v, ok := compiler.FloatForScalarNode(v10)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 11;
v11 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v11 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v11)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 12;
v12 := compiler.MapValueForKey(m, "minimum")
if v12 != nil {
v, ok := compiler.FloatForScalarNode(v12)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 13;
v13 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v13 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 14;
v14 := compiler.MapValueForKey(m, "maxLength")
if v14 != nil {
t, ok := compiler.IntForScalarNode(v14)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 15;
v15 := compiler.MapValueForKey(m, "minLength")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 16;
v16 := compiler.MapValueForKey(m, "pattern")
if v16 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v16)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 17;
v17 := compiler.MapValueForKey(m, "maxItems")
if v17 != nil {
t, ok := compiler.IntForScalarNode(v17)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 18;
v18 := compiler.MapValueForKey(m, "minItems")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 19;
v19 := compiler.MapValueForKey(m, "uniqueItems")
if v19 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v19)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 20;
v20 := compiler.MapValueForKey(m, "enum")
if v20 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v20)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 21;
v21 := compiler.MapValueForKey(m, "multipleOf")
if v21 != nil {
v, ok := compiler.FloatForScalarNode(v21)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v21))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 22;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPaths creates an object of type Paths if possible, returning an error if not.
func NewPaths(in *yaml.Node, context *compiler.Context) (*Paths, error) {
errors := make([]error, 0)
x := &Paths{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{}
allowedPatterns := []*regexp.Regexp{pattern0, pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated NamedAny vendor_extension = 1;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
// repeated NamedPathItem path = 2;
// MAP: PathItem ^/
x.Path = make([]*NamedPathItem, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "/") {
pair := &NamedPathItem{}
pair.Name = k
var err error
pair.Value, err = NewPathItem(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.Path = append(x.Path, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPrimitivesItems creates an object of type PrimitivesItems if possible, returning an error if not.
func NewPrimitivesItems(in *yaml.Node, context *compiler.Context) (*PrimitivesItems, error) {
errors := make([]error, 0)
x := &PrimitivesItems{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"collectionFormat", "default", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number integer boolean array]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 2;
v2 := compiler.MapValueForKey(m, "format")
if v2 != nil {
x.Format, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 3;
v3 := compiler.MapValueForKey(m, "items")
if v3 != nil {
var err error
x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 4;
v4 := compiler.MapValueForKey(m, "collectionFormat")
if v4 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 5;
v5 := compiler.MapValueForKey(m, "default")
if v5 != nil {
var err error
x.Default, err = NewAny(v5, compiler.NewContext("default", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 6;
v6 := compiler.MapValueForKey(m, "maximum")
if v6 != nil {
v, ok := compiler.FloatForScalarNode(v6)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 7;
v7 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v7 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 8;
v8 := compiler.MapValueForKey(m, "minimum")
if v8 != nil {
v, ok := compiler.FloatForScalarNode(v8)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 9;
v9 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v9 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 10;
v10 := compiler.MapValueForKey(m, "maxLength")
if v10 != nil {
t, ok := compiler.IntForScalarNode(v10)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 11;
v11 := compiler.MapValueForKey(m, "minLength")
if v11 != nil {
t, ok := compiler.IntForScalarNode(v11)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 12;
v12 := compiler.MapValueForKey(m, "pattern")
if v12 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 13;
v13 := compiler.MapValueForKey(m, "maxItems")
if v13 != nil {
t, ok := compiler.IntForScalarNode(v13)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 14;
v14 := compiler.MapValueForKey(m, "minItems")
if v14 != nil {
t, ok := compiler.IntForScalarNode(v14)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 15;
v15 := compiler.MapValueForKey(m, "uniqueItems")
if v15 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v15)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 16;
v16 := compiler.MapValueForKey(m, "enum")
if v16 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v16)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 17;
v17 := compiler.MapValueForKey(m, "multipleOf")
if v17 != nil {
v, ok := compiler.FloatForScalarNode(v17)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 18;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewProperties creates an object of type Properties if possible, returning an error if not.
func NewProperties(in *yaml.Node, context *compiler.Context) (*Properties, error) {
errors := make([]error, 0)
x := &Properties{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSchema additional_properties = 1;
// MAP: Schema
x.AdditionalProperties = make([]*NamedSchema, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSchema{}
pair.Name = k
var err error
pair.Value, err = NewSchema(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewQueryParameterSubSchema creates an object of type QueryParameterSubSchema if possible, returning an error if not.
func NewQueryParameterSubSchema(in *yaml.Node, context *compiler.Context) (*QueryParameterSubSchema, error) {
errors := make([]error, 0)
x := &QueryParameterSubSchema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool required = 1;
v1 := compiler.MapValueForKey(m, "required")
if v1 != nil {
x.Required, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 2;
v2 := compiler.MapValueForKey(m, "in")
if v2 != nil {
x.In, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [query]
if ok && !compiler.StringArrayContainsValue([]string{"query"}, x.In) {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 4;
v4 := compiler.MapValueForKey(m, "name")
if v4 != nil {
x.Name, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_empty_value = 5;
v5 := compiler.MapValueForKey(m, "allowEmptyValue")
if v5 != nil {
x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string type = 6;
v6 := compiler.MapValueForKey(m, "type")
if v6 != nil {
x.Type, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [string number boolean integer array]
if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 7;
v7 := compiler.MapValueForKey(m, "format")
if v7 != nil {
x.Format, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// PrimitivesItems items = 8;
v8 := compiler.MapValueForKey(m, "items")
if v8 != nil {
var err error
x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// string collection_format = 9;
v9 := compiler.MapValueForKey(m, "collectionFormat")
if v9 != nil {
x.CollectionFormat, ok = compiler.StringForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
// check for valid enum values
// [csv ssv tsv pipes multi]
if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) {
message := fmt.Sprintf("has unexpected value for collectionFormat: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 10;
v10 := compiler.MapValueForKey(m, "default")
if v10 != nil {
var err error
x.Default, err = NewAny(v10, compiler.NewContext("default", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// float maximum = 11;
v11 := compiler.MapValueForKey(m, "maximum")
if v11 != nil {
v, ok := compiler.FloatForScalarNode(v11)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 12;
v12 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v12 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 13;
v13 := compiler.MapValueForKey(m, "minimum")
if v13 != nil {
v, ok := compiler.FloatForScalarNode(v13)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 14;
v14 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v14 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 15;
v15 := compiler.MapValueForKey(m, "maxLength")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 16;
v16 := compiler.MapValueForKey(m, "minLength")
if v16 != nil {
t, ok := compiler.IntForScalarNode(v16)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 17;
v17 := compiler.MapValueForKey(m, "pattern")
if v17 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 18;
v18 := compiler.MapValueForKey(m, "maxItems")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 19;
v19 := compiler.MapValueForKey(m, "minItems")
if v19 != nil {
t, ok := compiler.IntForScalarNode(v19)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 20;
v20 := compiler.MapValueForKey(m, "uniqueItems")
if v20 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v20)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v20))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 21;
v21 := compiler.MapValueForKey(m, "enum")
if v21 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v21)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// float multiple_of = 22;
v22 := compiler.MapValueForKey(m, "multipleOf")
if v22 != nil {
v, ok := compiler.FloatForScalarNode(v22)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v22))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 23;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponse creates an object of type Response if possible, returning an error if not.
func NewResponse(in *yaml.Node, context *compiler.Context) (*Response, error) {
errors := make([]error, 0)
x := &Response{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"description"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "examples", "headers", "schema"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// SchemaItem schema = 2;
v2 := compiler.MapValueForKey(m, "schema")
if v2 != nil {
var err error
x.Schema, err = NewSchemaItem(v2, compiler.NewContext("schema", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// Headers headers = 3;
v3 := compiler.MapValueForKey(m, "headers")
if v3 != nil {
var err error
x.Headers, err = NewHeaders(v3, compiler.NewContext("headers", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// Examples examples = 4;
v4 := compiler.MapValueForKey(m, "examples")
if v4 != nil {
var err error
x.Examples, err = NewExamples(v4, compiler.NewContext("examples", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 5;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponseDefinitions creates an object of type ResponseDefinitions if possible, returning an error if not.
func NewResponseDefinitions(in *yaml.Node, context *compiler.Context) (*ResponseDefinitions, error) {
errors := make([]error, 0)
x := &ResponseDefinitions{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedResponse additional_properties = 1;
// MAP: Response
x.AdditionalProperties = make([]*NamedResponse, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedResponse{}
pair.Name = k
var err error
pair.Value, err = NewResponse(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponseValue creates an object of type ResponseValue if possible, returning an error if not.
func NewResponseValue(in *yaml.Node, context *compiler.Context) (*ResponseValue, error) {
errors := make([]error, 0)
x := &ResponseValue{}
matched := false
// Response response = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewResponse(m, compiler.NewContext("response", m, context))
if matchingError == nil {
x.Oneof = &ResponseValue_Response{Response: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// JsonReference json_reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", m, context))
if matchingError == nil {
x.Oneof = &ResponseValue_JsonReference{JsonReference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid ResponseValue")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponses creates an object of type Responses if possible, returning an error if not.
func NewResponses(in *yaml.Node, context *compiler.Context) (*Responses, error) {
errors := make([]error, 0)
x := &Responses{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{}
allowedPatterns := []*regexp.Regexp{pattern2, pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated NamedResponseValue response_code = 1;
// MAP: ResponseValue ^([0-9]{3})$|^(default)$
x.ResponseCode = make([]*NamedResponseValue, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if pattern2.MatchString(k) {
pair := &NamedResponseValue{}
pair.Name = k
var err error
pair.Value, err = NewResponseValue(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.ResponseCode = append(x.ResponseCode, pair)
}
}
}
// repeated NamedAny vendor_extension = 2;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchema creates an object of type Schema if possible, returning an error if not.
func NewSchema(in *yaml.Node, context *compiler.Context) (*Schema, error) {
errors := make([]error, 0)
x := &Schema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "additionalProperties", "allOf", "default", "description", "discriminator", "enum", "example", "exclusiveMaximum", "exclusiveMinimum", "externalDocs", "format", "items", "maxItems", "maxLength", "maxProperties", "maximum", "minItems", "minLength", "minProperties", "minimum", "multipleOf", "pattern", "properties", "readOnly", "required", "title", "type", "uniqueItems", "xml"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 2;
v2 := compiler.MapValueForKey(m, "format")
if v2 != nil {
x.Format, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string title = 3;
v3 := compiler.MapValueForKey(m, "title")
if v3 != nil {
x.Title, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 4;
v4 := compiler.MapValueForKey(m, "description")
if v4 != nil {
x.Description, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any default = 5;
v5 := compiler.MapValueForKey(m, "default")
if v5 != nil {
var err error
x.Default, err = NewAny(v5, compiler.NewContext("default", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// float multiple_of = 6;
v6 := compiler.MapValueForKey(m, "multipleOf")
if v6 != nil {
v, ok := compiler.FloatForScalarNode(v6)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// float maximum = 7;
v7 := compiler.MapValueForKey(m, "maximum")
if v7 != nil {
v, ok := compiler.FloatForScalarNode(v7)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 8;
v8 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v8 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 9;
v9 := compiler.MapValueForKey(m, "minimum")
if v9 != nil {
v, ok := compiler.FloatForScalarNode(v9)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 10;
v10 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v10 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v10)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 11;
v11 := compiler.MapValueForKey(m, "maxLength")
if v11 != nil {
t, ok := compiler.IntForScalarNode(v11)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 12;
v12 := compiler.MapValueForKey(m, "minLength")
if v12 != nil {
t, ok := compiler.IntForScalarNode(v12)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 13;
v13 := compiler.MapValueForKey(m, "pattern")
if v13 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v13)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 14;
v14 := compiler.MapValueForKey(m, "maxItems")
if v14 != nil {
t, ok := compiler.IntForScalarNode(v14)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 15;
v15 := compiler.MapValueForKey(m, "minItems")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 16;
v16 := compiler.MapValueForKey(m, "uniqueItems")
if v16 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v16)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_properties = 17;
v17 := compiler.MapValueForKey(m, "maxProperties")
if v17 != nil {
t, ok := compiler.IntForScalarNode(v17)
if ok {
x.MaxProperties = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxProperties: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_properties = 18;
v18 := compiler.MapValueForKey(m, "minProperties")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MinProperties = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minProperties: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string required = 19;
v19 := compiler.MapValueForKey(m, "required")
if v19 != nil {
v, ok := compiler.SequenceNodeForNode(v19)
if ok {
x.Required = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 20;
v20 := compiler.MapValueForKey(m, "enum")
if v20 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v20)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// AdditionalPropertiesItem additional_properties = 21;
v21 := compiler.MapValueForKey(m, "additionalProperties")
if v21 != nil {
var err error
x.AdditionalProperties, err = NewAdditionalPropertiesItem(v21, compiler.NewContext("additionalProperties", v21, context))
if err != nil {
errors = append(errors, err)
}
}
// TypeItem type = 22;
v22 := compiler.MapValueForKey(m, "type")
if v22 != nil {
var err error
x.Type, err = NewTypeItem(v22, compiler.NewContext("type", v22, context))
if err != nil {
errors = append(errors, err)
}
}
// ItemsItem items = 23;
v23 := compiler.MapValueForKey(m, "items")
if v23 != nil {
var err error
x.Items, err = NewItemsItem(v23, compiler.NewContext("items", v23, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated Schema all_of = 24;
v24 := compiler.MapValueForKey(m, "allOf")
if v24 != nil {
// repeated Schema
x.AllOf = make([]*Schema, 0)
a, ok := compiler.SequenceNodeForNode(v24)
if ok {
for _, item := range a.Content {
y, err := NewSchema(item, compiler.NewContext("allOf", item, context))
if err != nil {
errors = append(errors, err)
}
x.AllOf = append(x.AllOf, y)
}
}
}
// Properties properties = 25;
v25 := compiler.MapValueForKey(m, "properties")
if v25 != nil {
var err error
x.Properties, err = NewProperties(v25, compiler.NewContext("properties", v25, context))
if err != nil {
errors = append(errors, err)
}
}
// string discriminator = 26;
v26 := compiler.MapValueForKey(m, "discriminator")
if v26 != nil {
x.Discriminator, ok = compiler.StringForScalarNode(v26)
if !ok {
message := fmt.Sprintf("has unexpected value for discriminator: %s", compiler.Display(v26))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool read_only = 27;
v27 := compiler.MapValueForKey(m, "readOnly")
if v27 != nil {
x.ReadOnly, ok = compiler.BoolForScalarNode(v27)
if !ok {
message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v27))
errors = append(errors, compiler.NewError(context, message))
}
}
// Xml xml = 28;
v28 := compiler.MapValueForKey(m, "xml")
if v28 != nil {
var err error
x.Xml, err = NewXml(v28, compiler.NewContext("xml", v28, context))
if err != nil {
errors = append(errors, err)
}
}
// ExternalDocs external_docs = 29;
v29 := compiler.MapValueForKey(m, "externalDocs")
if v29 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v29, compiler.NewContext("externalDocs", v29, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 30;
v30 := compiler.MapValueForKey(m, "example")
if v30 != nil {
var err error
x.Example, err = NewAny(v30, compiler.NewContext("example", v30, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 31;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchemaItem creates an object of type SchemaItem if possible, returning an error if not.
func NewSchemaItem(in *yaml.Node, context *compiler.Context) (*SchemaItem, error) {
errors := make([]error, 0)
x := &SchemaItem{}
matched := false
// Schema schema = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewSchema(m, compiler.NewContext("schema", m, context))
if matchingError == nil {
x.Oneof = &SchemaItem_Schema{Schema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// FileSchema file_schema = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewFileSchema(m, compiler.NewContext("fileSchema", m, context))
if matchingError == nil {
x.Oneof = &SchemaItem_FileSchema{FileSchema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid SchemaItem")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecurityDefinitions creates an object of type SecurityDefinitions if possible, returning an error if not.
func NewSecurityDefinitions(in *yaml.Node, context *compiler.Context) (*SecurityDefinitions, error) {
errors := make([]error, 0)
x := &SecurityDefinitions{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSecurityDefinitionsItem additional_properties = 1;
// MAP: SecurityDefinitionsItem
x.AdditionalProperties = make([]*NamedSecurityDefinitionsItem, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSecurityDefinitionsItem{}
pair.Name = k
var err error
pair.Value, err = NewSecurityDefinitionsItem(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecurityDefinitionsItem creates an object of type SecurityDefinitionsItem if possible, returning an error if not.
func NewSecurityDefinitionsItem(in *yaml.Node, context *compiler.Context) (*SecurityDefinitionsItem, error) {
errors := make([]error, 0)
x := &SecurityDefinitionsItem{}
matched := false
// BasicAuthenticationSecurity basic_authentication_security = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewBasicAuthenticationSecurity(m, compiler.NewContext("basicAuthenticationSecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_BasicAuthenticationSecurity{BasicAuthenticationSecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// ApiKeySecurity api_key_security = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewApiKeySecurity(m, compiler.NewContext("apiKeySecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_ApiKeySecurity{ApiKeySecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Oauth2ImplicitSecurity oauth2_implicit_security = 3;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewOauth2ImplicitSecurity(m, compiler.NewContext("oauth2ImplicitSecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_Oauth2ImplicitSecurity{Oauth2ImplicitSecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Oauth2PasswordSecurity oauth2_password_security = 4;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewOauth2PasswordSecurity(m, compiler.NewContext("oauth2PasswordSecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_Oauth2PasswordSecurity{Oauth2PasswordSecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Oauth2ApplicationSecurity oauth2_application_security = 5;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewOauth2ApplicationSecurity(m, compiler.NewContext("oauth2ApplicationSecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_Oauth2ApplicationSecurity{Oauth2ApplicationSecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewOauth2AccessCodeSecurity(m, compiler.NewContext("oauth2AccessCodeSecurity", m, context))
if matchingError == nil {
x.Oneof = &SecurityDefinitionsItem_Oauth2AccessCodeSecurity{Oauth2AccessCodeSecurity: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid SecurityDefinitionsItem")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not.
func NewSecurityRequirement(in *yaml.Node, context *compiler.Context) (*SecurityRequirement, error) {
errors := make([]error, 0)
x := &SecurityRequirement{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedStringArray additional_properties = 1;
// MAP: StringArray
x.AdditionalProperties = make([]*NamedStringArray, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedStringArray{}
pair.Name = k
var err error
pair.Value, err = NewStringArray(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewStringArray creates an object of type StringArray if possible, returning an error if not.
func NewStringArray(in *yaml.Node, context *compiler.Context) (*StringArray, error) {
errors := make([]error, 0)
x := &StringArray{}
x.Value = make([]string, 0)
for _, node := range in.Content {
s, _ := compiler.StringForScalarNode(node)
x.Value = append(x.Value, s)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewTag creates an object of type Tag if possible, returning an error if not.
func NewTag(in *yaml.Node, context *compiler.Context) (*Tag, error) {
errors := make([]error, 0)
x := &Tag{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"name"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "externalDocs", "name"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExternalDocs external_docs = 3;
v3 := compiler.MapValueForKey(m, "externalDocs")
if v3 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v3, compiler.NewContext("externalDocs", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny vendor_extension = 4;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewTypeItem creates an object of type TypeItem if possible, returning an error if not.
func NewTypeItem(in *yaml.Node, context *compiler.Context) (*TypeItem, error) {
errors := make([]error, 0)
x := &TypeItem{}
v1 := in
switch v1.Kind {
case yaml.ScalarNode:
x.Value = make([]string, 0)
x.Value = append(x.Value, v1.Value)
case yaml.SequenceNode:
x.Value = make([]string, 0)
for _, v := range v1.Content {
value := v.Value
ok := v.Kind == yaml.ScalarNode
if ok {
x.Value = append(x.Value, value)
} else {
message := fmt.Sprintf("has unexpected value for string array element: %+v (%T)", value, value)
errors = append(errors, compiler.NewError(context, message))
}
}
default:
message := fmt.Sprintf("has unexpected value for string array: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewVendorExtension creates an object of type VendorExtension if possible, returning an error if not.
func NewVendorExtension(in *yaml.Node, context *compiler.Context) (*VendorExtension, error) {
errors := make([]error, 0)
x := &VendorExtension{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedAny additional_properties = 1;
// MAP: Any
x.AdditionalProperties = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewXml creates an object of type Xml if possible, returning an error if not.
func NewXml(in *yaml.Node, context *compiler.Context) (*Xml, error) {
errors := make([]error, 0)
x := &Xml{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"attribute", "name", "namespace", "prefix", "wrapped"}
allowedPatterns := []*regexp.Regexp{pattern0}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string namespace = 2;
v2 := compiler.MapValueForKey(m, "namespace")
if v2 != nil {
x.Namespace, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for namespace: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string prefix = 3;
v3 := compiler.MapValueForKey(m, "prefix")
if v3 != nil {
x.Prefix, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for prefix: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool attribute = 4;
v4 := compiler.MapValueForKey(m, "attribute")
if v4 != nil {
x.Attribute, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for attribute: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool wrapped = 5;
v5 := compiler.MapValueForKey(m, "wrapped")
if v5 != nil {
x.Wrapped, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for wrapped: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny vendor_extension = 6;
// MAP: Any ^x-
x.VendorExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.VendorExtension = append(x.VendorExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside AdditionalPropertiesItem objects.
func (m *AdditionalPropertiesItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*AdditionalPropertiesItem_Schema)
if ok {
_, err := p.Schema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Any objects.
func (m *Any) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ApiKeySecurity objects.
func (m *ApiKeySecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside BasicAuthenticationSecurity objects.
func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside BodyParameter objects.
func (m *BodyParameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schema != nil {
_, err := m.Schema.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Contact objects.
func (m *Contact) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Default objects.
func (m *Default) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Definitions objects.
func (m *Definitions) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Document objects.
func (m *Document) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Info != nil {
_, err := m.Info.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Paths != nil {
_, err := m.Paths.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Definitions != nil {
_, err := m.Definitions.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Parameters != nil {
_, err := m.Parameters.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Responses != nil {
_, err := m.Responses.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Security {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.SecurityDefinitions != nil {
_, err := m.SecurityDefinitions.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Tags {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Examples objects.
func (m *Examples) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ExternalDocs objects.
func (m *ExternalDocs) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside FileSchema objects.
func (m *FileSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside FormDataParameterSubSchema objects.
func (m *FormDataParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Header objects.
func (m *Header) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside HeaderParameterSubSchema objects.
func (m *HeaderParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Headers objects.
func (m *Headers) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Info objects.
func (m *Info) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Contact != nil {
_, err := m.Contact.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.License != nil {
_, err := m.License.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ItemsItem objects.
func (m *ItemsItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.Schema {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside JsonReference objects.
func (m *JsonReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewJsonReference(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside License objects.
func (m *License) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedAny objects.
func (m *NamedAny) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedHeader objects.
func (m *NamedHeader) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedParameter objects.
func (m *NamedParameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedPathItem objects.
func (m *NamedPathItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedResponse objects.
func (m *NamedResponse) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedResponseValue objects.
func (m *NamedResponseValue) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedSchema objects.
func (m *NamedSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedSecurityDefinitionsItem objects.
func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedString objects.
func (m *NamedString) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedStringArray objects.
func (m *NamedStringArray) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NonBodyParameter objects.
func (m *NonBodyParameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*NonBodyParameter_HeaderParameterSubSchema)
if ok {
_, err := p.HeaderParameterSubSchema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*NonBodyParameter_FormDataParameterSubSchema)
if ok {
_, err := p.FormDataParameterSubSchema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*NonBodyParameter_QueryParameterSubSchema)
if ok {
_, err := p.QueryParameterSubSchema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*NonBodyParameter_PathParameterSubSchema)
if ok {
_, err := p.PathParameterSubSchema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2AccessCodeSecurity objects.
func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2ApplicationSecurity objects.
func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2ImplicitSecurity objects.
func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2PasswordSecurity objects.
func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Oauth2Scopes objects.
func (m *Oauth2Scopes) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Operation objects.
func (m *Operation) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Parameters {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.Responses != nil {
_, err := m.Responses.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Security {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Parameter objects.
func (m *Parameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*Parameter_BodyParameter)
if ok {
_, err := p.BodyParameter.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*Parameter_NonBodyParameter)
if ok {
_, err := p.NonBodyParameter.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ParameterDefinitions objects.
func (m *ParameterDefinitions) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ParametersItem objects.
func (m *ParametersItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*ParametersItem_Parameter)
if ok {
_, err := p.Parameter.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*ParametersItem_JsonReference)
if ok {
info, err := p.JsonReference.ResolveReferences(root)
if err != nil {
return nil, err
} else if info != nil {
n, err := NewParametersItem(info, nil)
if err != nil {
return nil, err
} else if n != nil {
*m = *n
return nil, nil
}
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside PathItem objects.
func (m *PathItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewPathItem(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
if m.Get != nil {
_, err := m.Get.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Put != nil {
_, err := m.Put.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Post != nil {
_, err := m.Post.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Delete != nil {
_, err := m.Delete.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Options != nil {
_, err := m.Options.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Head != nil {
_, err := m.Head.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Patch != nil {
_, err := m.Patch.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Parameters {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside PathParameterSubSchema objects.
func (m *PathParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Paths objects.
func (m *Paths) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.Path {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside PrimitivesItems objects.
func (m *PrimitivesItems) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Properties objects.
func (m *Properties) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside QueryParameterSubSchema objects.
func (m *QueryParameterSubSchema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Response objects.
func (m *Response) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schema != nil {
_, err := m.Schema.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Headers != nil {
_, err := m.Headers.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Examples != nil {
_, err := m.Examples.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ResponseDefinitions objects.
func (m *ResponseDefinitions) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ResponseValue objects.
func (m *ResponseValue) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*ResponseValue_Response)
if ok {
_, err := p.Response.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*ResponseValue_JsonReference)
if ok {
info, err := p.JsonReference.ResolveReferences(root)
if err != nil {
return nil, err
} else if info != nil {
n, err := NewResponseValue(info, nil)
if err != nil {
return nil, err
} else if n != nil {
*m = *n
return nil, nil
}
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Responses objects.
func (m *Responses) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.ResponseCode {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Schema objects.
func (m *Schema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewSchema(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.AdditionalProperties != nil {
_, err := m.AdditionalProperties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Type != nil {
_, err := m.Type.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.AllOf {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.Properties != nil {
_, err := m.Properties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Xml != nil {
_, err := m.Xml.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SchemaItem objects.
func (m *SchemaItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*SchemaItem_Schema)
if ok {
_, err := p.Schema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SchemaItem_FileSchema)
if ok {
_, err := p.FileSchema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecurityDefinitions objects.
func (m *SecurityDefinitions) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecurityDefinitionsItem objects.
func (m *SecurityDefinitionsItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_BasicAuthenticationSecurity)
if ok {
_, err := p.BasicAuthenticationSecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_ApiKeySecurity)
if ok {
_, err := p.ApiKeySecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ImplicitSecurity)
if ok {
_, err := p.Oauth2ImplicitSecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2PasswordSecurity)
if ok {
_, err := p.Oauth2PasswordSecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ApplicationSecurity)
if ok {
_, err := p.Oauth2ApplicationSecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)
if ok {
_, err := p.Oauth2AccessCodeSecurity.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecurityRequirement objects.
func (m *SecurityRequirement) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside StringArray objects.
func (m *StringArray) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Tag objects.
func (m *Tag) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside TypeItem objects.
func (m *TypeItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside VendorExtension objects.
func (m *VendorExtension) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Xml objects.
func (m *Xml) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.VendorExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export.
func (m *AdditionalPropertiesItem) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// AdditionalPropertiesItem
// {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetSchema()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
return compiler.NewScalarNodeForBool(v1.Boolean)
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Any suitable for JSON or YAML export.
func (m *Any) ToRawInfo() *yaml.Node {
var err error
var node yaml.Node
err = yaml.Unmarshal([]byte(m.Yaml), &node)
if err == nil {
if node.Kind == yaml.DocumentNode {
return node.Content[0]
}
return &node
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of ApiKeySecurity suitable for JSON or YAML export.
func (m *ApiKeySecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of BasicAuthenticationSecurity suitable for JSON or YAML export.
func (m *BasicAuthenticationSecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of BodyParameter suitable for JSON or YAML export.
func (m *BodyParameter) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, m.Schema.ToRawInfo())
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Contact suitable for JSON or YAML export.
func (m *Contact) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Url != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
}
if m.Email != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("email"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Email))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Default suitable for JSON or YAML export.
func (m *Default) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Definitions suitable for JSON or YAML export.
func (m *Definitions) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Document suitable for JSON or YAML export.
func (m *Document) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("swagger"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Swagger))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("info"))
info.Content = append(info.Content, m.Info.ToRawInfo())
if m.Host != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("host"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Host))
}
if m.BasePath != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("basePath"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BasePath))
}
if len(m.Schemes) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schemes"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Schemes))
}
if len(m.Consumes) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("consumes"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Consumes))
}
if len(m.Produces) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("produces"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Produces))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("paths"))
info.Content = append(info.Content, m.Paths.ToRawInfo())
if m.Definitions != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("definitions"))
info.Content = append(info.Content, m.Definitions.ToRawInfo())
}
if m.Parameters != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, m.Parameters.ToRawInfo())
}
if m.Responses != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("responses"))
info.Content = append(info.Content, m.Responses.ToRawInfo())
}
if len(m.Security) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Security {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("security"))
info.Content = append(info.Content, items)
}
if m.SecurityDefinitions != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("securityDefinitions"))
info.Content = append(info.Content, m.SecurityDefinitions.ToRawInfo())
}
if len(m.Tags) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Tags {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("tags"))
info.Content = append(info.Content, items)
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Examples suitable for JSON or YAML export.
func (m *Examples) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export.
func (m *ExternalDocs) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of FileSchema suitable for JSON or YAML export.
func (m *FileSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Title != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if len(m.Required) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
if m.ReadOnly != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly))
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of FormDataParameterSubSchema suitable for JSON or YAML export.
func (m *FormDataParameterSubSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.In != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.AllowEmptyValue != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Header suitable for JSON or YAML export.
func (m *Header) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of HeaderParameterSubSchema suitable for JSON or YAML export.
func (m *HeaderParameterSubSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.In != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Headers suitable for JSON or YAML export.
func (m *Headers) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Info suitable for JSON or YAML export.
func (m *Info) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("version"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Version))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.TermsOfService != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("termsOfService"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TermsOfService))
}
if m.Contact != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("contact"))
info.Content = append(info.Content, m.Contact.ToRawInfo())
}
if m.License != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("license"))
info.Content = append(info.Content, m.License.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export.
func (m *ItemsItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Schema) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Schema {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, items)
}
return info
}
// ToRawInfo returns a description of JsonReference suitable for JSON or YAML export.
func (m *JsonReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
return info
}
// ToRawInfo returns a description of License suitable for JSON or YAML export.
func (m *License) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
if m.Url != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of NamedAny suitable for JSON or YAML export.
func (m *NamedAny) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Value != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, m.Value.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of NamedHeader suitable for JSON or YAML export.
func (m *NamedHeader) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export.
func (m *NamedParameter) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export.
func (m *NamedPathItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedResponse suitable for JSON or YAML export.
func (m *NamedResponse) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedResponseValue suitable for JSON or YAML export.
func (m *NamedResponseValue) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:ResponseValue StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export.
func (m *NamedSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedSecurityDefinitionsItem suitable for JSON or YAML export.
func (m *NamedSecurityDefinitionsItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:SecurityDefinitionsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedString suitable for JSON or YAML export.
func (m *NamedString) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Value != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Value))
}
return info
}
// ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export.
func (m *NamedStringArray) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:StringArray StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NonBodyParameter suitable for JSON or YAML export.
func (m *NonBodyParameter) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// NonBodyParameter
// {Name:headerParameterSubSchema Type:HeaderParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetHeaderParameterSubSchema()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:formDataParameterSubSchema Type:FormDataParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetFormDataParameterSubSchema()
if v1 != nil {
return v1.ToRawInfo()
}
// {Name:queryParameterSubSchema Type:QueryParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v2 := m.GetQueryParameterSubSchema()
if v2 != nil {
return v2.ToRawInfo()
}
// {Name:pathParameterSubSchema Type:PathParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v3 := m.GetPathParameterSubSchema()
if v3 != nil {
return v3.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Oauth2AccessCodeSecurity suitable for JSON or YAML export.
func (m *Oauth2AccessCodeSecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("flow"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow))
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.AuthorizationUrl))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Oauth2ApplicationSecurity suitable for JSON or YAML export.
func (m *Oauth2ApplicationSecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("flow"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow))
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Oauth2ImplicitSecurity suitable for JSON or YAML export.
func (m *Oauth2ImplicitSecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("flow"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow))
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.AuthorizationUrl))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Oauth2PasswordSecurity suitable for JSON or YAML export.
func (m *Oauth2PasswordSecurity) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("flow"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Flow))
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Oauth2Scopes suitable for JSON or YAML export.
func (m *Oauth2Scopes) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:}
return info
}
// ToRawInfo returns a description of Operation suitable for JSON or YAML export.
func (m *Operation) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Tags) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("tags"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Tags))
}
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.OperationId != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("operationId"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OperationId))
}
if len(m.Produces) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("produces"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Produces))
}
if len(m.Consumes) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("consumes"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Consumes))
}
if len(m.Parameters) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Parameters {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, items)
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("responses"))
info.Content = append(info.Content, m.Responses.ToRawInfo())
if len(m.Schemes) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schemes"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Schemes))
}
if m.Deprecated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated))
}
if len(m.Security) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Security {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("security"))
info.Content = append(info.Content, items)
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Parameter suitable for JSON or YAML export.
func (m *Parameter) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// Parameter
// {Name:bodyParameter Type:BodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetBodyParameter()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:nonBodyParameter Type:NonBodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetNonBodyParameter()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of ParameterDefinitions suitable for JSON or YAML export.
func (m *ParameterDefinitions) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ParametersItem suitable for JSON or YAML export.
func (m *ParametersItem) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// ParametersItem
// {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetParameter()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetJsonReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of PathItem suitable for JSON or YAML export.
func (m *PathItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.Get != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("get"))
info.Content = append(info.Content, m.Get.ToRawInfo())
}
if m.Put != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("put"))
info.Content = append(info.Content, m.Put.ToRawInfo())
}
if m.Post != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("post"))
info.Content = append(info.Content, m.Post.ToRawInfo())
}
if m.Delete != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("delete"))
info.Content = append(info.Content, m.Delete.ToRawInfo())
}
if m.Options != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("options"))
info.Content = append(info.Content, m.Options.ToRawInfo())
}
if m.Head != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("head"))
info.Content = append(info.Content, m.Head.ToRawInfo())
}
if m.Patch != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("patch"))
info.Content = append(info.Content, m.Patch.ToRawInfo())
}
if len(m.Parameters) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Parameters {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, items)
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of PathParameterSubSchema suitable for JSON or YAML export.
func (m *PathParameterSubSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
if m.In != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Paths suitable for JSON or YAML export.
func (m *Paths) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
if m.Path != nil {
for _, item := range m.Path {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of PrimitivesItems suitable for JSON or YAML export.
func (m *PrimitivesItems) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Properties suitable for JSON or YAML export.
func (m *Properties) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of QueryParameterSubSchema suitable for JSON or YAML export.
func (m *QueryParameterSubSchema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.In != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.AllowEmptyValue != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue))
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Items != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, m.Items.ToRawInfo())
}
if m.CollectionFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("collectionFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.CollectionFormat))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Response suitable for JSON or YAML export.
func (m *Response) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
if m.Schema != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, m.Schema.ToRawInfo())
}
if m.Headers != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("headers"))
info.Content = append(info.Content, m.Headers.ToRawInfo())
}
if m.Examples != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("examples"))
info.Content = append(info.Content, m.Examples.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ResponseDefinitions suitable for JSON or YAML export.
func (m *ResponseDefinitions) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ResponseValue suitable for JSON or YAML export.
func (m *ResponseValue) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// ResponseValue
// {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetResponse()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetJsonReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Responses suitable for JSON or YAML export.
func (m *Responses) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.ResponseCode != nil {
for _, item := range m.ResponseCode {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Schema suitable for JSON or YAML export.
func (m *Schema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.Title != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if m.MaxProperties != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxProperties"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxProperties))
}
if m.MinProperties != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minProperties"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinProperties))
}
if len(m.Required) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.AdditionalProperties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("additionalProperties"))
info.Content = append(info.Content, m.AdditionalProperties.ToRawInfo())
}
if m.Type != nil {
if len(m.Type.Value) == 1 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type.Value[0]))
} else {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Type.Value))
}
}
if m.Items != nil {
items := compiler.NewSequenceNode()
for _, item := range m.Items.Schema {
items.Content = append(items.Content, item.ToRawInfo())
}
if len(items.Content) == 1 {
items = items.Content[0]
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, items)
}
if len(m.AllOf) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.AllOf {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("allOf"))
info.Content = append(info.Content, items)
}
if m.Properties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("properties"))
info.Content = append(info.Content, m.Properties.ToRawInfo())
}
if m.Discriminator != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("discriminator"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Discriminator))
}
if m.ReadOnly != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly))
}
if m.Xml != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("xml"))
info.Content = append(info.Content, m.Xml.ToRawInfo())
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SchemaItem suitable for JSON or YAML export.
func (m *SchemaItem) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// SchemaItem
// {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetSchema()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:fileSchema Type:FileSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetFileSchema()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of SecurityDefinitions suitable for JSON or YAML export.
func (m *SecurityDefinitions) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SecurityDefinitionsItem suitable for JSON or YAML export.
func (m *SecurityDefinitionsItem) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// SecurityDefinitionsItem
// {Name:basicAuthenticationSecurity Type:BasicAuthenticationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetBasicAuthenticationSecurity()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:apiKeySecurity Type:ApiKeySecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetApiKeySecurity()
if v1 != nil {
return v1.ToRawInfo()
}
// {Name:oauth2ImplicitSecurity Type:Oauth2ImplicitSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v2 := m.GetOauth2ImplicitSecurity()
if v2 != nil {
return v2.ToRawInfo()
}
// {Name:oauth2PasswordSecurity Type:Oauth2PasswordSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v3 := m.GetOauth2PasswordSecurity()
if v3 != nil {
return v3.ToRawInfo()
}
// {Name:oauth2ApplicationSecurity Type:Oauth2ApplicationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v4 := m.GetOauth2ApplicationSecurity()
if v4 != nil {
return v4.ToRawInfo()
}
// {Name:oauth2AccessCodeSecurity Type:Oauth2AccessCodeSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v5 := m.GetOauth2AccessCodeSecurity()
if v5 != nil {
return v5.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export.
func (m *SecurityRequirement) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of StringArray suitable for JSON or YAML export.
func (m *StringArray) ToRawInfo() *yaml.Node {
return compiler.NewSequenceNodeForStringArray(m.Value)
}
// ToRawInfo returns a description of Tag suitable for JSON or YAML export.
func (m *Tag) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of TypeItem suitable for JSON or YAML export.
func (m *TypeItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Value) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Value))
}
return info
}
// ToRawInfo returns a description of VendorExtension suitable for JSON or YAML export.
func (m *VendorExtension) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Xml suitable for JSON or YAML export.
func (m *Xml) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Namespace != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("namespace"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Namespace))
}
if m.Prefix != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("prefix"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Prefix))
}
if m.Attribute != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("attribute"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Attribute))
}
if m.Wrapped != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("wrapped"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Wrapped))
}
if m.VendorExtension != nil {
for _, item := range m.VendorExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
var (
pattern0 = regexp.MustCompile("^x-")
pattern1 = regexp.MustCompile("^/")
pattern2 = regexp.MustCompile("^([0-9]{3})$|^(default)$")
)
gnostic-models-0.6.8/openapiv2/OpenAPIv2.pb.go 0000664 0000000 0000000 00001031256 14225377162 0021032 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: openapiv2/OpenAPIv2.proto
package openapi_v2
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
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)
)
type AdditionalPropertiesItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *AdditionalPropertiesItem_Schema
// *AdditionalPropertiesItem_Boolean
Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"`
}
func (x *AdditionalPropertiesItem) Reset() {
*x = AdditionalPropertiesItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AdditionalPropertiesItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AdditionalPropertiesItem) ProtoMessage() {}
func (x *AdditionalPropertiesItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 AdditionalPropertiesItem.ProtoReflect.Descriptor instead.
func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{0}
}
func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *AdditionalPropertiesItem) GetSchema() *Schema {
if x, ok := x.GetOneof().(*AdditionalPropertiesItem_Schema); ok {
return x.Schema
}
return nil
}
func (x *AdditionalPropertiesItem) GetBoolean() bool {
if x, ok := x.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
return x.Boolean
}
return false
}
type isAdditionalPropertiesItem_Oneof interface {
isAdditionalPropertiesItem_Oneof()
}
type AdditionalPropertiesItem_Schema struct {
Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"`
}
type AdditionalPropertiesItem_Boolean struct {
Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"`
}
func (*AdditionalPropertiesItem_Schema) isAdditionalPropertiesItem_Oneof() {}
func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {}
type Any struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *anypb.Any `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"`
}
func (x *Any) Reset() {
*x = Any{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Any) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Any) ProtoMessage() {}
func (x *Any) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 Any.ProtoReflect.Descriptor instead.
func (*Any) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{1}
}
func (x *Any) GetValue() *anypb.Any {
if x != nil {
return x.Value
}
return nil
}
func (x *Any) GetYaml() string {
if x != nil {
return x.Yaml
}
return ""
}
type ApiKeySecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
In string `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *ApiKeySecurity) Reset() {
*x = ApiKeySecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ApiKeySecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApiKeySecurity) ProtoMessage() {}
func (x *ApiKeySecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 ApiKeySecurity.ProtoReflect.Descriptor instead.
func (*ApiKeySecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{2}
}
func (x *ApiKeySecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *ApiKeySecurity) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ApiKeySecurity) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *ApiKeySecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ApiKeySecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type BasicAuthenticationSecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *BasicAuthenticationSecurity) Reset() {
*x = BasicAuthenticationSecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BasicAuthenticationSecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BasicAuthenticationSecurity) ProtoMessage() {}
func (x *BasicAuthenticationSecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 BasicAuthenticationSecurity.ProtoReflect.Descriptor instead.
func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{3}
}
func (x *BasicAuthenticationSecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *BasicAuthenticationSecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *BasicAuthenticationSecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type BodyParameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Determines the location of the parameter.
In string `protobuf:"bytes,3,opt,name=in,proto3" json:"in,omitempty"`
// Determines whether or not this parameter is required or optional.
Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
Schema *Schema `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *BodyParameter) Reset() {
*x = BodyParameter{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BodyParameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BodyParameter) ProtoMessage() {}
func (x *BodyParameter) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 BodyParameter.ProtoReflect.Descriptor instead.
func (*BodyParameter) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{4}
}
func (x *BodyParameter) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *BodyParameter) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *BodyParameter) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *BodyParameter) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *BodyParameter) GetSchema() *Schema {
if x != nil {
return x.Schema
}
return nil
}
func (x *BodyParameter) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// Contact information for the owners of the API.
type Contact struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The identifying name of the contact person/organization.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The URL pointing to the contact information.
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// The email address of the contact person/organization.
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Contact) Reset() {
*x = Contact{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Contact) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Contact) ProtoMessage() {}
func (x *Contact) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5]
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 Contact.ProtoReflect.Descriptor instead.
func (*Contact) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{5}
}
func (x *Contact) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Contact) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Contact) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *Contact) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Default struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Default) Reset() {
*x = Default{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Default) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Default) ProtoMessage() {}
func (x *Default) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6]
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 Default.ProtoReflect.Descriptor instead.
func (*Default) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{6}
}
func (x *Default) GetAdditionalProperties() []*NamedAny {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// One or more JSON objects describing the schemas being consumed and produced by the API.
type Definitions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Definitions) Reset() {
*x = Definitions{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Definitions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Definitions) ProtoMessage() {}
func (x *Definitions) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7]
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 Definitions.ProtoReflect.Descriptor instead.
func (*Definitions) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{7}
}
func (x *Definitions) GetAdditionalProperties() []*NamedSchema {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Document struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The Swagger version of this document.
Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"`
Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
// The host (name or ip) of the API. Example: 'swagger.io'
Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
// The base path to the API. Example: '/api'.
BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"`
// The transfer protocol of the API.
Schemes []string `protobuf:"bytes,5,rep,name=schemes,proto3" json:"schemes,omitempty"`
// A list of MIME types accepted by the API.
Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"`
// A list of MIME types the API can produce.
Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"`
Paths *Paths `protobuf:"bytes,8,opt,name=paths,proto3" json:"paths,omitempty"`
Definitions *Definitions `protobuf:"bytes,9,opt,name=definitions,proto3" json:"definitions,omitempty"`
Parameters *ParameterDefinitions `protobuf:"bytes,10,opt,name=parameters,proto3" json:"parameters,omitempty"`
Responses *ResponseDefinitions `protobuf:"bytes,11,opt,name=responses,proto3" json:"responses,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,13,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"`
Tags []*Tag `protobuf:"bytes,14,rep,name=tags,proto3" json:"tags,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,15,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,16,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Document) Reset() {
*x = Document{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Document) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Document) ProtoMessage() {}
func (x *Document) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8]
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 Document.ProtoReflect.Descriptor instead.
func (*Document) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{8}
}
func (x *Document) GetSwagger() string {
if x != nil {
return x.Swagger
}
return ""
}
func (x *Document) GetInfo() *Info {
if x != nil {
return x.Info
}
return nil
}
func (x *Document) GetHost() string {
if x != nil {
return x.Host
}
return ""
}
func (x *Document) GetBasePath() string {
if x != nil {
return x.BasePath
}
return ""
}
func (x *Document) GetSchemes() []string {
if x != nil {
return x.Schemes
}
return nil
}
func (x *Document) GetConsumes() []string {
if x != nil {
return x.Consumes
}
return nil
}
func (x *Document) GetProduces() []string {
if x != nil {
return x.Produces
}
return nil
}
func (x *Document) GetPaths() *Paths {
if x != nil {
return x.Paths
}
return nil
}
func (x *Document) GetDefinitions() *Definitions {
if x != nil {
return x.Definitions
}
return nil
}
func (x *Document) GetParameters() *ParameterDefinitions {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Document) GetResponses() *ResponseDefinitions {
if x != nil {
return x.Responses
}
return nil
}
func (x *Document) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Document) GetSecurityDefinitions() *SecurityDefinitions {
if x != nil {
return x.SecurityDefinitions
}
return nil
}
func (x *Document) GetTags() []*Tag {
if x != nil {
return x.Tags
}
return nil
}
func (x *Document) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Document) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Examples struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Examples) Reset() {
*x = Examples{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Examples) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Examples) ProtoMessage() {}
func (x *Examples) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_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 Examples.ProtoReflect.Descriptor instead.
func (*Examples) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{9}
}
func (x *Examples) GetAdditionalProperties() []*NamedAny {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// information about external documentation
type ExternalDocs struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *ExternalDocs) Reset() {
*x = ExternalDocs{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExternalDocs) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExternalDocs) ProtoMessage() {}
func (x *ExternalDocs) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10]
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 ExternalDocs.ProtoReflect.Descriptor instead.
func (*ExternalDocs) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{10}
}
func (x *ExternalDocs) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ExternalDocs) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *ExternalDocs) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// A deterministic version of a JSON Schema object.
type FileSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Default *Any `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"`
Required []string `protobuf:"bytes,5,rep,name=required,proto3" json:"required,omitempty"`
Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
Example *Any `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *FileSchema) Reset() {
*x = FileSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileSchema) ProtoMessage() {}
func (x *FileSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11]
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 FileSchema.ProtoReflect.Descriptor instead.
func (*FileSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{11}
}
func (x *FileSchema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *FileSchema) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *FileSchema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *FileSchema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *FileSchema) GetRequired() []string {
if x != nil {
return x.Required
}
return nil
}
func (x *FileSchema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *FileSchema) GetReadOnly() bool {
if x != nil {
return x.ReadOnly
}
return false
}
func (x *FileSchema) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *FileSchema) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *FileSchema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type FormDataParameterSubSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Determines whether or not this parameter is required or optional.
Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"`
// Determines the location of the parameter.
In string `protobuf:"bytes,2,opt,name=in,proto3" json:"in,omitempty"`
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// allows sending a parameter by name only or with an empty value.
AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"`
Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *FormDataParameterSubSchema) Reset() {
*x = FormDataParameterSubSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FormDataParameterSubSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FormDataParameterSubSchema) ProtoMessage() {}
func (x *FormDataParameterSubSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12]
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 FormDataParameterSubSchema.ProtoReflect.Descriptor instead.
func (*FormDataParameterSubSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{12}
}
func (x *FormDataParameterSubSchema) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *FormDataParameterSubSchema) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *FormDataParameterSubSchema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *FormDataParameterSubSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *FormDataParameterSubSchema) GetAllowEmptyValue() bool {
if x != nil {
return x.AllowEmptyValue
}
return false
}
func (x *FormDataParameterSubSchema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *FormDataParameterSubSchema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *FormDataParameterSubSchema) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *FormDataParameterSubSchema) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *FormDataParameterSubSchema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *FormDataParameterSubSchema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *FormDataParameterSubSchema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *FormDataParameterSubSchema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *FormDataParameterSubSchema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *FormDataParameterSubSchema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *FormDataParameterSubSchema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *FormDataParameterSubSchema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *FormDataParameterSubSchema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *FormDataParameterSubSchema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *FormDataParameterSubSchema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *FormDataParameterSubSchema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *FormDataParameterSubSchema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *FormDataParameterSubSchema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Header struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
Description string `protobuf:"bytes,18,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,19,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Header) Reset() {
*x = Header{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Header) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Header) ProtoMessage() {}
func (x *Header) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13]
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 Header.ProtoReflect.Descriptor instead.
func (*Header) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{13}
}
func (x *Header) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Header) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Header) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *Header) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *Header) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *Header) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *Header) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *Header) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *Header) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *Header) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *Header) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *Header) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *Header) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *Header) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *Header) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *Header) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *Header) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *Header) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Header) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type HeaderParameterSubSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Determines whether or not this parameter is required or optional.
Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"`
// Determines the location of the parameter.
In string `protobuf:"bytes,2,opt,name=in,proto3" json:"in,omitempty"`
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *HeaderParameterSubSchema) Reset() {
*x = HeaderParameterSubSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeaderParameterSubSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeaderParameterSubSchema) ProtoMessage() {}
func (x *HeaderParameterSubSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14]
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 HeaderParameterSubSchema.ProtoReflect.Descriptor instead.
func (*HeaderParameterSubSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{14}
}
func (x *HeaderParameterSubSchema) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *HeaderParameterSubSchema) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *HeaderParameterSubSchema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *HeaderParameterSubSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *HeaderParameterSubSchema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *HeaderParameterSubSchema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *HeaderParameterSubSchema) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *HeaderParameterSubSchema) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *HeaderParameterSubSchema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *HeaderParameterSubSchema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *HeaderParameterSubSchema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *HeaderParameterSubSchema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *HeaderParameterSubSchema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *HeaderParameterSubSchema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *HeaderParameterSubSchema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *HeaderParameterSubSchema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *HeaderParameterSubSchema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *HeaderParameterSubSchema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *HeaderParameterSubSchema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *HeaderParameterSubSchema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *HeaderParameterSubSchema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *HeaderParameterSubSchema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Headers struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedHeader `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Headers) Reset() {
*x = Headers{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Headers) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Headers) ProtoMessage() {}
func (x *Headers) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15]
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 Headers.ProtoReflect.Descriptor instead.
func (*Headers) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{15}
}
func (x *Headers) GetAdditionalProperties() []*NamedHeader {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// General information about the API.
type Info struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A unique and precise title of the API.
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// A semantic version number of the API.
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// The terms of service for the API.
TermsOfService string `protobuf:"bytes,4,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"`
Contact *Contact `protobuf:"bytes,5,opt,name=contact,proto3" json:"contact,omitempty"`
License *License `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Info) Reset() {
*x = Info{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Info) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Info) ProtoMessage() {}
func (x *Info) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16]
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 Info.ProtoReflect.Descriptor instead.
func (*Info) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{16}
}
func (x *Info) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Info) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Info) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Info) GetTermsOfService() string {
if x != nil {
return x.TermsOfService
}
return ""
}
func (x *Info) GetContact() *Contact {
if x != nil {
return x.Contact
}
return nil
}
func (x *Info) GetLicense() *License {
if x != nil {
return x.License
}
return nil
}
func (x *Info) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type ItemsItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Schema []*Schema `protobuf:"bytes,1,rep,name=schema,proto3" json:"schema,omitempty"`
}
func (x *ItemsItem) Reset() {
*x = ItemsItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ItemsItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ItemsItem) ProtoMessage() {}
func (x *ItemsItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17]
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 ItemsItem.ProtoReflect.Descriptor instead.
func (*ItemsItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{17}
}
func (x *ItemsItem) GetSchema() []*Schema {
if x != nil {
return x.Schema
}
return nil
}
type JsonReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *JsonReference) Reset() {
*x = JsonReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JsonReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JsonReference) ProtoMessage() {}
func (x *JsonReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18]
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 JsonReference.ProtoReflect.Descriptor instead.
func (*JsonReference) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{18}
}
func (x *JsonReference) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *JsonReference) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type License struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the license type. It's encouraged to use an OSI compatible license.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The URL pointing to the license.
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *License) Reset() {
*x = License{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *License) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*License) ProtoMessage() {}
func (x *License) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19]
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 License.ProtoReflect.Descriptor instead.
func (*License) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{19}
}
func (x *License) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *License) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *License) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
type NamedAny struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedAny) Reset() {
*x = NamedAny{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedAny) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedAny) ProtoMessage() {}
func (x *NamedAny) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20]
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 NamedAny.ProtoReflect.Descriptor instead.
func (*NamedAny) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{20}
}
func (x *NamedAny) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedAny) GetValue() *Any {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
type NamedHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Header `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedHeader) Reset() {
*x = NamedHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedHeader) ProtoMessage() {}
func (x *NamedHeader) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21]
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 NamedHeader.ProtoReflect.Descriptor instead.
func (*NamedHeader) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{21}
}
func (x *NamedHeader) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedHeader) GetValue() *Header {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
type NamedParameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Parameter `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedParameter) Reset() {
*x = NamedParameter{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedParameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedParameter) ProtoMessage() {}
func (x *NamedParameter) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22]
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 NamedParameter.ProtoReflect.Descriptor instead.
func (*NamedParameter) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{22}
}
func (x *NamedParameter) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedParameter) GetValue() *Parameter {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
type NamedPathItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *PathItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedPathItem) Reset() {
*x = NamedPathItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedPathItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedPathItem) ProtoMessage() {}
func (x *NamedPathItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23]
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 NamedPathItem.ProtoReflect.Descriptor instead.
func (*NamedPathItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{23}
}
func (x *NamedPathItem) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedPathItem) GetValue() *PathItem {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
type NamedResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Response `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedResponse) Reset() {
*x = NamedResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedResponse) ProtoMessage() {}
func (x *NamedResponse) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24]
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 NamedResponse.ProtoReflect.Descriptor instead.
func (*NamedResponse) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{24}
}
func (x *NamedResponse) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedResponse) GetValue() *Response {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
type NamedResponseValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *ResponseValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedResponseValue) Reset() {
*x = NamedResponseValue{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedResponseValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedResponseValue) ProtoMessage() {}
func (x *NamedResponseValue) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25]
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 NamedResponseValue.ProtoReflect.Descriptor instead.
func (*NamedResponseValue) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{25}
}
func (x *NamedResponseValue) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedResponseValue) GetValue() *ResponseValue {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
type NamedSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Schema `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedSchema) Reset() {
*x = NamedSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedSchema) ProtoMessage() {}
func (x *NamedSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26]
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 NamedSchema.ProtoReflect.Descriptor instead.
func (*NamedSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{26}
}
func (x *NamedSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedSchema) GetValue() *Schema {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
type NamedSecurityDefinitionsItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *SecurityDefinitionsItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedSecurityDefinitionsItem) Reset() {
*x = NamedSecurityDefinitionsItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedSecurityDefinitionsItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedSecurityDefinitionsItem) ProtoMessage() {}
func (x *NamedSecurityDefinitionsItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27]
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 NamedSecurityDefinitionsItem.ProtoReflect.Descriptor instead.
func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{27}
}
func (x *NamedSecurityDefinitionsItem) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedSecurityDefinitionsItem) GetValue() *SecurityDefinitionsItem {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
type NamedString struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedString) Reset() {
*x = NamedString{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedString) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedString) ProtoMessage() {}
func (x *NamedString) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28]
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 NamedString.ProtoReflect.Descriptor instead.
func (*NamedString) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{28}
}
func (x *NamedString) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedString) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
type NamedStringArray struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *StringArray `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedStringArray) Reset() {
*x = NamedStringArray{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedStringArray) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedStringArray) ProtoMessage() {}
func (x *NamedStringArray) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29]
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 NamedStringArray.ProtoReflect.Descriptor instead.
func (*NamedStringArray) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{29}
}
func (x *NamedStringArray) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedStringArray) GetValue() *StringArray {
if x != nil {
return x.Value
}
return nil
}
type NonBodyParameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *NonBodyParameter_HeaderParameterSubSchema
// *NonBodyParameter_FormDataParameterSubSchema
// *NonBodyParameter_QueryParameterSubSchema
// *NonBodyParameter_PathParameterSubSchema
Oneof isNonBodyParameter_Oneof `protobuf_oneof:"oneof"`
}
func (x *NonBodyParameter) Reset() {
*x = NonBodyParameter{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NonBodyParameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NonBodyParameter) ProtoMessage() {}
func (x *NonBodyParameter) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30]
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 NonBodyParameter.ProtoReflect.Descriptor instead.
func (*NonBodyParameter) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{30}
}
func (m *NonBodyParameter) GetOneof() isNonBodyParameter_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *NonBodyParameter) GetHeaderParameterSubSchema() *HeaderParameterSubSchema {
if x, ok := x.GetOneof().(*NonBodyParameter_HeaderParameterSubSchema); ok {
return x.HeaderParameterSubSchema
}
return nil
}
func (x *NonBodyParameter) GetFormDataParameterSubSchema() *FormDataParameterSubSchema {
if x, ok := x.GetOneof().(*NonBodyParameter_FormDataParameterSubSchema); ok {
return x.FormDataParameterSubSchema
}
return nil
}
func (x *NonBodyParameter) GetQueryParameterSubSchema() *QueryParameterSubSchema {
if x, ok := x.GetOneof().(*NonBodyParameter_QueryParameterSubSchema); ok {
return x.QueryParameterSubSchema
}
return nil
}
func (x *NonBodyParameter) GetPathParameterSubSchema() *PathParameterSubSchema {
if x, ok := x.GetOneof().(*NonBodyParameter_PathParameterSubSchema); ok {
return x.PathParameterSubSchema
}
return nil
}
type isNonBodyParameter_Oneof interface {
isNonBodyParameter_Oneof()
}
type NonBodyParameter_HeaderParameterSubSchema struct {
HeaderParameterSubSchema *HeaderParameterSubSchema `protobuf:"bytes,1,opt,name=header_parameter_sub_schema,json=headerParameterSubSchema,proto3,oneof"`
}
type NonBodyParameter_FormDataParameterSubSchema struct {
FormDataParameterSubSchema *FormDataParameterSubSchema `protobuf:"bytes,2,opt,name=form_data_parameter_sub_schema,json=formDataParameterSubSchema,proto3,oneof"`
}
type NonBodyParameter_QueryParameterSubSchema struct {
QueryParameterSubSchema *QueryParameterSubSchema `protobuf:"bytes,3,opt,name=query_parameter_sub_schema,json=queryParameterSubSchema,proto3,oneof"`
}
type NonBodyParameter_PathParameterSubSchema struct {
PathParameterSubSchema *PathParameterSubSchema `protobuf:"bytes,4,opt,name=path_parameter_sub_schema,json=pathParameterSubSchema,proto3,oneof"`
}
func (*NonBodyParameter_HeaderParameterSubSchema) isNonBodyParameter_Oneof() {}
func (*NonBodyParameter_FormDataParameterSubSchema) isNonBodyParameter_Oneof() {}
func (*NonBodyParameter_QueryParameterSubSchema) isNonBodyParameter_Oneof() {}
func (*NonBodyParameter_PathParameterSubSchema) isNonBodyParameter_Oneof() {}
type Oauth2AccessCodeSecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"`
TokenUrl string `protobuf:"bytes,5,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Oauth2AccessCodeSecurity) Reset() {
*x = Oauth2AccessCodeSecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2AccessCodeSecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2AccessCodeSecurity) ProtoMessage() {}
func (x *Oauth2AccessCodeSecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31]
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 Oauth2AccessCodeSecurity.ProtoReflect.Descriptor instead.
func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{31}
}
func (x *Oauth2AccessCodeSecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Oauth2AccessCodeSecurity) GetFlow() string {
if x != nil {
return x.Flow
}
return ""
}
func (x *Oauth2AccessCodeSecurity) GetScopes() *Oauth2Scopes {
if x != nil {
return x.Scopes
}
return nil
}
func (x *Oauth2AccessCodeSecurity) GetAuthorizationUrl() string {
if x != nil {
return x.AuthorizationUrl
}
return ""
}
func (x *Oauth2AccessCodeSecurity) GetTokenUrl() string {
if x != nil {
return x.TokenUrl
}
return ""
}
func (x *Oauth2AccessCodeSecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Oauth2AccessCodeSecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Oauth2ApplicationSecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Oauth2ApplicationSecurity) Reset() {
*x = Oauth2ApplicationSecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2ApplicationSecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2ApplicationSecurity) ProtoMessage() {}
func (x *Oauth2ApplicationSecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32]
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 Oauth2ApplicationSecurity.ProtoReflect.Descriptor instead.
func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{32}
}
func (x *Oauth2ApplicationSecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Oauth2ApplicationSecurity) GetFlow() string {
if x != nil {
return x.Flow
}
return ""
}
func (x *Oauth2ApplicationSecurity) GetScopes() *Oauth2Scopes {
if x != nil {
return x.Scopes
}
return nil
}
func (x *Oauth2ApplicationSecurity) GetTokenUrl() string {
if x != nil {
return x.TokenUrl
}
return ""
}
func (x *Oauth2ApplicationSecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Oauth2ApplicationSecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Oauth2ImplicitSecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Oauth2ImplicitSecurity) Reset() {
*x = Oauth2ImplicitSecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2ImplicitSecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2ImplicitSecurity) ProtoMessage() {}
func (x *Oauth2ImplicitSecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33]
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 Oauth2ImplicitSecurity.ProtoReflect.Descriptor instead.
func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{33}
}
func (x *Oauth2ImplicitSecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Oauth2ImplicitSecurity) GetFlow() string {
if x != nil {
return x.Flow
}
return ""
}
func (x *Oauth2ImplicitSecurity) GetScopes() *Oauth2Scopes {
if x != nil {
return x.Scopes
}
return nil
}
func (x *Oauth2ImplicitSecurity) GetAuthorizationUrl() string {
if x != nil {
return x.AuthorizationUrl
}
return ""
}
func (x *Oauth2ImplicitSecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Oauth2ImplicitSecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Oauth2PasswordSecurity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Oauth2PasswordSecurity) Reset() {
*x = Oauth2PasswordSecurity{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2PasswordSecurity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2PasswordSecurity) ProtoMessage() {}
func (x *Oauth2PasswordSecurity) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34]
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 Oauth2PasswordSecurity.ProtoReflect.Descriptor instead.
func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{34}
}
func (x *Oauth2PasswordSecurity) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Oauth2PasswordSecurity) GetFlow() string {
if x != nil {
return x.Flow
}
return ""
}
func (x *Oauth2PasswordSecurity) GetScopes() *Oauth2Scopes {
if x != nil {
return x.Scopes
}
return nil
}
func (x *Oauth2PasswordSecurity) GetTokenUrl() string {
if x != nil {
return x.TokenUrl
}
return ""
}
func (x *Oauth2PasswordSecurity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Oauth2PasswordSecurity) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Oauth2Scopes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Oauth2Scopes) Reset() {
*x = Oauth2Scopes{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Oauth2Scopes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Oauth2Scopes) ProtoMessage() {}
func (x *Oauth2Scopes) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35]
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 Oauth2Scopes.ProtoReflect.Descriptor instead.
func (*Oauth2Scopes) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{35}
}
func (x *Oauth2Scopes) GetAdditionalProperties() []*NamedString {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Operation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
// A brief summary of the operation.
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
// A longer description of the operation, GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
// A unique identifier of the operation.
OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
// A list of MIME types the API can produce.
Produces []string `protobuf:"bytes,6,rep,name=produces,proto3" json:"produces,omitempty"`
// A list of MIME types the API can consume.
Consumes []string `protobuf:"bytes,7,rep,name=consumes,proto3" json:"consumes,omitempty"`
// The parameters needed to send a valid API call.
Parameters []*ParametersItem `protobuf:"bytes,8,rep,name=parameters,proto3" json:"parameters,omitempty"`
Responses *Responses `protobuf:"bytes,9,opt,name=responses,proto3" json:"responses,omitempty"`
// The transfer protocol of the API.
Schemes []string `protobuf:"bytes,10,rep,name=schemes,proto3" json:"schemes,omitempty"`
Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,13,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Operation) Reset() {
*x = Operation{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Operation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Operation) ProtoMessage() {}
func (x *Operation) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36]
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 Operation.ProtoReflect.Descriptor instead.
func (*Operation) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{36}
}
func (x *Operation) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
func (x *Operation) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *Operation) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Operation) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Operation) GetOperationId() string {
if x != nil {
return x.OperationId
}
return ""
}
func (x *Operation) GetProduces() []string {
if x != nil {
return x.Produces
}
return nil
}
func (x *Operation) GetConsumes() []string {
if x != nil {
return x.Consumes
}
return nil
}
func (x *Operation) GetParameters() []*ParametersItem {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Operation) GetResponses() *Responses {
if x != nil {
return x.Responses
}
return nil
}
func (x *Operation) GetSchemes() []string {
if x != nil {
return x.Schemes
}
return nil
}
func (x *Operation) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Operation) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Operation) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Parameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *Parameter_BodyParameter
// *Parameter_NonBodyParameter
Oneof isParameter_Oneof `protobuf_oneof:"oneof"`
}
func (x *Parameter) Reset() {
*x = Parameter{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Parameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Parameter) ProtoMessage() {}
func (x *Parameter) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37]
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 Parameter.ProtoReflect.Descriptor instead.
func (*Parameter) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{37}
}
func (m *Parameter) GetOneof() isParameter_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *Parameter) GetBodyParameter() *BodyParameter {
if x, ok := x.GetOneof().(*Parameter_BodyParameter); ok {
return x.BodyParameter
}
return nil
}
func (x *Parameter) GetNonBodyParameter() *NonBodyParameter {
if x, ok := x.GetOneof().(*Parameter_NonBodyParameter); ok {
return x.NonBodyParameter
}
return nil
}
type isParameter_Oneof interface {
isParameter_Oneof()
}
type Parameter_BodyParameter struct {
BodyParameter *BodyParameter `protobuf:"bytes,1,opt,name=body_parameter,json=bodyParameter,proto3,oneof"`
}
type Parameter_NonBodyParameter struct {
NonBodyParameter *NonBodyParameter `protobuf:"bytes,2,opt,name=non_body_parameter,json=nonBodyParameter,proto3,oneof"`
}
func (*Parameter_BodyParameter) isParameter_Oneof() {}
func (*Parameter_NonBodyParameter) isParameter_Oneof() {}
// One or more JSON representations for parameters
type ParameterDefinitions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ParameterDefinitions) Reset() {
*x = ParameterDefinitions{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ParameterDefinitions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ParameterDefinitions) ProtoMessage() {}
func (x *ParameterDefinitions) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38]
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 ParameterDefinitions.ProtoReflect.Descriptor instead.
func (*ParameterDefinitions) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{38}
}
func (x *ParameterDefinitions) GetAdditionalProperties() []*NamedParameter {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type ParametersItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *ParametersItem_Parameter
// *ParametersItem_JsonReference
Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"`
}
func (x *ParametersItem) Reset() {
*x = ParametersItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ParametersItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ParametersItem) ProtoMessage() {}
func (x *ParametersItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39]
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 ParametersItem.ProtoReflect.Descriptor instead.
func (*ParametersItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{39}
}
func (m *ParametersItem) GetOneof() isParametersItem_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *ParametersItem) GetParameter() *Parameter {
if x, ok := x.GetOneof().(*ParametersItem_Parameter); ok {
return x.Parameter
}
return nil
}
func (x *ParametersItem) GetJsonReference() *JsonReference {
if x, ok := x.GetOneof().(*ParametersItem_JsonReference); ok {
return x.JsonReference
}
return nil
}
type isParametersItem_Oneof interface {
isParametersItem_Oneof()
}
type ParametersItem_Parameter struct {
Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,proto3,oneof"`
}
type ParametersItem_JsonReference struct {
JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"`
}
func (*ParametersItem_Parameter) isParametersItem_Oneof() {}
func (*ParametersItem_JsonReference) isParametersItem_Oneof() {}
type PathItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Get *Operation `protobuf:"bytes,2,opt,name=get,proto3" json:"get,omitempty"`
Put *Operation `protobuf:"bytes,3,opt,name=put,proto3" json:"put,omitempty"`
Post *Operation `protobuf:"bytes,4,opt,name=post,proto3" json:"post,omitempty"`
Delete *Operation `protobuf:"bytes,5,opt,name=delete,proto3" json:"delete,omitempty"`
Options *Operation `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
Head *Operation `protobuf:"bytes,7,opt,name=head,proto3" json:"head,omitempty"`
Patch *Operation `protobuf:"bytes,8,opt,name=patch,proto3" json:"patch,omitempty"`
// The parameters needed to send a valid API call.
Parameters []*ParametersItem `protobuf:"bytes,9,rep,name=parameters,proto3" json:"parameters,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *PathItem) Reset() {
*x = PathItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PathItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PathItem) ProtoMessage() {}
func (x *PathItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40]
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 PathItem.ProtoReflect.Descriptor instead.
func (*PathItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{40}
}
func (x *PathItem) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *PathItem) GetGet() *Operation {
if x != nil {
return x.Get
}
return nil
}
func (x *PathItem) GetPut() *Operation {
if x != nil {
return x.Put
}
return nil
}
func (x *PathItem) GetPost() *Operation {
if x != nil {
return x.Post
}
return nil
}
func (x *PathItem) GetDelete() *Operation {
if x != nil {
return x.Delete
}
return nil
}
func (x *PathItem) GetOptions() *Operation {
if x != nil {
return x.Options
}
return nil
}
func (x *PathItem) GetHead() *Operation {
if x != nil {
return x.Head
}
return nil
}
func (x *PathItem) GetPatch() *Operation {
if x != nil {
return x.Patch
}
return nil
}
func (x *PathItem) GetParameters() []*ParametersItem {
if x != nil {
return x.Parameters
}
return nil
}
func (x *PathItem) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type PathParameterSubSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Determines whether or not this parameter is required or optional.
Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"`
// Determines the location of the parameter.
In string `protobuf:"bytes,2,opt,name=in,proto3" json:"in,omitempty"`
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,6,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,9,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,10,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,12,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,16,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *PathParameterSubSchema) Reset() {
*x = PathParameterSubSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PathParameterSubSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PathParameterSubSchema) ProtoMessage() {}
func (x *PathParameterSubSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41]
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 PathParameterSubSchema.ProtoReflect.Descriptor instead.
func (*PathParameterSubSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{41}
}
func (x *PathParameterSubSchema) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *PathParameterSubSchema) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *PathParameterSubSchema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *PathParameterSubSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PathParameterSubSchema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *PathParameterSubSchema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *PathParameterSubSchema) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *PathParameterSubSchema) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *PathParameterSubSchema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *PathParameterSubSchema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *PathParameterSubSchema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *PathParameterSubSchema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *PathParameterSubSchema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *PathParameterSubSchema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *PathParameterSubSchema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *PathParameterSubSchema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *PathParameterSubSchema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *PathParameterSubSchema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *PathParameterSubSchema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *PathParameterSubSchema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *PathParameterSubSchema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *PathParameterSubSchema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
type Paths struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
VendorExtension []*NamedAny `protobuf:"bytes,1,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
Path []*NamedPathItem `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
}
func (x *Paths) Reset() {
*x = Paths{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Paths) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Paths) ProtoMessage() {}
func (x *Paths) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42]
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 Paths.ProtoReflect.Descriptor instead.
func (*Paths) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{42}
}
func (x *Paths) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
func (x *Paths) GetPath() []*NamedPathItem {
if x != nil {
return x.Path
}
return nil
}
type PrimitivesItems struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,6,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,8,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,12,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,16,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,18,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *PrimitivesItems) Reset() {
*x = PrimitivesItems{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PrimitivesItems) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrimitivesItems) ProtoMessage() {}
func (x *PrimitivesItems) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43]
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 PrimitivesItems.ProtoReflect.Descriptor instead.
func (*PrimitivesItems) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{43}
}
func (x *PrimitivesItems) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *PrimitivesItems) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *PrimitivesItems) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *PrimitivesItems) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *PrimitivesItems) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *PrimitivesItems) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *PrimitivesItems) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *PrimitivesItems) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *PrimitivesItems) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *PrimitivesItems) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *PrimitivesItems) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *PrimitivesItems) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *PrimitivesItems) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *PrimitivesItems) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *PrimitivesItems) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *PrimitivesItems) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *PrimitivesItems) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *PrimitivesItems) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Properties struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Properties) Reset() {
*x = Properties{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Properties) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Properties) ProtoMessage() {}
func (x *Properties) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44]
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 Properties.ProtoReflect.Descriptor instead.
func (*Properties) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{44}
}
func (x *Properties) GetAdditionalProperties() []*NamedSchema {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type QueryParameterSubSchema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Determines whether or not this parameter is required or optional.
Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"`
// Determines the location of the parameter.
In string `protobuf:"bytes,2,opt,name=in,proto3" json:"in,omitempty"`
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// allows sending a parameter by name only or with an empty value.
AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"`
Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
Format string `protobuf:"bytes,7,opt,name=format,proto3" json:"format,omitempty"`
Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items,proto3" json:"items,omitempty"`
CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat,proto3" json:"collection_format,omitempty"`
Default *Any `protobuf:"bytes,10,opt,name=default,proto3" json:"default,omitempty"`
Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
Enum []*Any `protobuf:"bytes,21,rep,name=enum,proto3" json:"enum,omitempty"`
MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *QueryParameterSubSchema) Reset() {
*x = QueryParameterSubSchema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParameterSubSchema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParameterSubSchema) ProtoMessage() {}
func (x *QueryParameterSubSchema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45]
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 QueryParameterSubSchema.ProtoReflect.Descriptor instead.
func (*QueryParameterSubSchema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{45}
}
func (x *QueryParameterSubSchema) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *QueryParameterSubSchema) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *QueryParameterSubSchema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *QueryParameterSubSchema) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *QueryParameterSubSchema) GetAllowEmptyValue() bool {
if x != nil {
return x.AllowEmptyValue
}
return false
}
func (x *QueryParameterSubSchema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *QueryParameterSubSchema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *QueryParameterSubSchema) GetItems() *PrimitivesItems {
if x != nil {
return x.Items
}
return nil
}
func (x *QueryParameterSubSchema) GetCollectionFormat() string {
if x != nil {
return x.CollectionFormat
}
return ""
}
func (x *QueryParameterSubSchema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *QueryParameterSubSchema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *QueryParameterSubSchema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *QueryParameterSubSchema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *QueryParameterSubSchema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *QueryParameterSubSchema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *QueryParameterSubSchema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *QueryParameterSubSchema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *QueryParameterSubSchema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *QueryParameterSubSchema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *QueryParameterSubSchema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *QueryParameterSubSchema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *QueryParameterSubSchema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *QueryParameterSubSchema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Schema *SchemaItem `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
Headers *Headers `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"`
Examples *Examples `protobuf:"bytes,4,opt,name=examples,proto3" json:"examples,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46]
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 Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{46}
}
func (x *Response) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Response) GetSchema() *SchemaItem {
if x != nil {
return x.Schema
}
return nil
}
func (x *Response) GetHeaders() *Headers {
if x != nil {
return x.Headers
}
return nil
}
func (x *Response) GetExamples() *Examples {
if x != nil {
return x.Examples
}
return nil
}
func (x *Response) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// One or more JSON representations for responses
type ResponseDefinitions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedResponse `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ResponseDefinitions) Reset() {
*x = ResponseDefinitions{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseDefinitions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseDefinitions) ProtoMessage() {}
func (x *ResponseDefinitions) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47]
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 ResponseDefinitions.ProtoReflect.Descriptor instead.
func (*ResponseDefinitions) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{47}
}
func (x *ResponseDefinitions) GetAdditionalProperties() []*NamedResponse {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type ResponseValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *ResponseValue_Response
// *ResponseValue_JsonReference
Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"`
}
func (x *ResponseValue) Reset() {
*x = ResponseValue{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseValue) ProtoMessage() {}
func (x *ResponseValue) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48]
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 ResponseValue.ProtoReflect.Descriptor instead.
func (*ResponseValue) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{48}
}
func (m *ResponseValue) GetOneof() isResponseValue_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *ResponseValue) GetResponse() *Response {
if x, ok := x.GetOneof().(*ResponseValue_Response); ok {
return x.Response
}
return nil
}
func (x *ResponseValue) GetJsonReference() *JsonReference {
if x, ok := x.GetOneof().(*ResponseValue_JsonReference); ok {
return x.JsonReference
}
return nil
}
type isResponseValue_Oneof interface {
isResponseValue_Oneof()
}
type ResponseValue_Response struct {
Response *Response `protobuf:"bytes,1,opt,name=response,proto3,oneof"`
}
type ResponseValue_JsonReference struct {
JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,proto3,oneof"`
}
func (*ResponseValue_Response) isResponseValue_Oneof() {}
func (*ResponseValue_JsonReference) isResponseValue_Oneof() {}
// Response objects names can either be any valid HTTP status code or 'default'.
type Responses struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResponseCode []*NamedResponseValue `protobuf:"bytes,1,rep,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,2,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Responses) Reset() {
*x = Responses{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Responses) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Responses) ProtoMessage() {}
func (x *Responses) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49]
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 Responses.ProtoReflect.Descriptor instead.
func (*Responses) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{49}
}
func (x *Responses) GetResponseCode() []*NamedResponseValue {
if x != nil {
return x.ResponseCode
}
return nil
}
func (x *Responses) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
// A deterministic version of a JSON Schema object.
type Schema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Default *Any `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"`
MultipleOf float64 `protobuf:"fixed64,6,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
Maximum float64 `protobuf:"fixed64,7,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,8,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,9,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,10,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,11,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,12,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,14,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,15,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,16,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
MaxProperties int64 `protobuf:"varint,17,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"`
MinProperties int64 `protobuf:"varint,18,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"`
Required []string `protobuf:"bytes,19,rep,name=required,proto3" json:"required,omitempty"`
Enum []*Any `protobuf:"bytes,20,rep,name=enum,proto3" json:"enum,omitempty"`
AdditionalProperties *AdditionalPropertiesItem `protobuf:"bytes,21,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
Type *TypeItem `protobuf:"bytes,22,opt,name=type,proto3" json:"type,omitempty"`
Items *ItemsItem `protobuf:"bytes,23,opt,name=items,proto3" json:"items,omitempty"`
AllOf []*Schema `protobuf:"bytes,24,rep,name=all_of,json=allOf,proto3" json:"all_of,omitempty"`
Properties *Properties `protobuf:"bytes,25,opt,name=properties,proto3" json:"properties,omitempty"`
Discriminator string `protobuf:"bytes,26,opt,name=discriminator,proto3" json:"discriminator,omitempty"`
ReadOnly bool `protobuf:"varint,27,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
Xml *Xml `protobuf:"bytes,28,opt,name=xml,proto3" json:"xml,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,29,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
Example *Any `protobuf:"bytes,30,opt,name=example,proto3" json:"example,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,31,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Schema) Reset() {
*x = Schema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Schema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50]
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 Schema.ProtoReflect.Descriptor instead.
func (*Schema) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{50}
}
func (x *Schema) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *Schema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Schema) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Schema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Schema) GetDefault() *Any {
if x != nil {
return x.Default
}
return nil
}
func (x *Schema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *Schema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *Schema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *Schema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *Schema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *Schema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *Schema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *Schema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *Schema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *Schema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *Schema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *Schema) GetMaxProperties() int64 {
if x != nil {
return x.MaxProperties
}
return 0
}
func (x *Schema) GetMinProperties() int64 {
if x != nil {
return x.MinProperties
}
return 0
}
func (x *Schema) GetRequired() []string {
if x != nil {
return x.Required
}
return nil
}
func (x *Schema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *Schema) GetAdditionalProperties() *AdditionalPropertiesItem {
if x != nil {
return x.AdditionalProperties
}
return nil
}
func (x *Schema) GetType() *TypeItem {
if x != nil {
return x.Type
}
return nil
}
func (x *Schema) GetItems() *ItemsItem {
if x != nil {
return x.Items
}
return nil
}
func (x *Schema) GetAllOf() []*Schema {
if x != nil {
return x.AllOf
}
return nil
}
func (x *Schema) GetProperties() *Properties {
if x != nil {
return x.Properties
}
return nil
}
func (x *Schema) GetDiscriminator() string {
if x != nil {
return x.Discriminator
}
return ""
}
func (x *Schema) GetReadOnly() bool {
if x != nil {
return x.ReadOnly
}
return false
}
func (x *Schema) GetXml() *Xml {
if x != nil {
return x.Xml
}
return nil
}
func (x *Schema) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Schema) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *Schema) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type SchemaItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *SchemaItem_Schema
// *SchemaItem_FileSchema
Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"`
}
func (x *SchemaItem) Reset() {
*x = SchemaItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SchemaItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SchemaItem) ProtoMessage() {}
func (x *SchemaItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51]
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 SchemaItem.ProtoReflect.Descriptor instead.
func (*SchemaItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{51}
}
func (m *SchemaItem) GetOneof() isSchemaItem_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *SchemaItem) GetSchema() *Schema {
if x, ok := x.GetOneof().(*SchemaItem_Schema); ok {
return x.Schema
}
return nil
}
func (x *SchemaItem) GetFileSchema() *FileSchema {
if x, ok := x.GetOneof().(*SchemaItem_FileSchema); ok {
return x.FileSchema
}
return nil
}
type isSchemaItem_Oneof interface {
isSchemaItem_Oneof()
}
type SchemaItem_Schema struct {
Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"`
}
type SchemaItem_FileSchema struct {
FileSchema *FileSchema `protobuf:"bytes,2,opt,name=file_schema,json=fileSchema,proto3,oneof"`
}
func (*SchemaItem_Schema) isSchemaItem_Oneof() {}
func (*SchemaItem_FileSchema) isSchemaItem_Oneof() {}
type SecurityDefinitions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSecurityDefinitionsItem `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *SecurityDefinitions) Reset() {
*x = SecurityDefinitions{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityDefinitions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityDefinitions) ProtoMessage() {}
func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52]
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 SecurityDefinitions.ProtoReflect.Descriptor instead.
func (*SecurityDefinitions) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{52}
}
func (x *SecurityDefinitions) GetAdditionalProperties() []*NamedSecurityDefinitionsItem {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type SecurityDefinitionsItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *SecurityDefinitionsItem_BasicAuthenticationSecurity
// *SecurityDefinitionsItem_ApiKeySecurity
// *SecurityDefinitionsItem_Oauth2ImplicitSecurity
// *SecurityDefinitionsItem_Oauth2PasswordSecurity
// *SecurityDefinitionsItem_Oauth2ApplicationSecurity
// *SecurityDefinitionsItem_Oauth2AccessCodeSecurity
Oneof isSecurityDefinitionsItem_Oneof `protobuf_oneof:"oneof"`
}
func (x *SecurityDefinitionsItem) Reset() {
*x = SecurityDefinitionsItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityDefinitionsItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityDefinitionsItem) ProtoMessage() {}
func (x *SecurityDefinitionsItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53]
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 SecurityDefinitionsItem.ProtoReflect.Descriptor instead.
func (*SecurityDefinitionsItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{53}
}
func (m *SecurityDefinitionsItem) GetOneof() isSecurityDefinitionsItem_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *SecurityDefinitionsItem) GetBasicAuthenticationSecurity() *BasicAuthenticationSecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_BasicAuthenticationSecurity); ok {
return x.BasicAuthenticationSecurity
}
return nil
}
func (x *SecurityDefinitionsItem) GetApiKeySecurity() *ApiKeySecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_ApiKeySecurity); ok {
return x.ApiKeySecurity
}
return nil
}
func (x *SecurityDefinitionsItem) GetOauth2ImplicitSecurity() *Oauth2ImplicitSecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2ImplicitSecurity); ok {
return x.Oauth2ImplicitSecurity
}
return nil
}
func (x *SecurityDefinitionsItem) GetOauth2PasswordSecurity() *Oauth2PasswordSecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2PasswordSecurity); ok {
return x.Oauth2PasswordSecurity
}
return nil
}
func (x *SecurityDefinitionsItem) GetOauth2ApplicationSecurity() *Oauth2ApplicationSecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2ApplicationSecurity); ok {
return x.Oauth2ApplicationSecurity
}
return nil
}
func (x *SecurityDefinitionsItem) GetOauth2AccessCodeSecurity() *Oauth2AccessCodeSecurity {
if x, ok := x.GetOneof().(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity); ok {
return x.Oauth2AccessCodeSecurity
}
return nil
}
type isSecurityDefinitionsItem_Oneof interface {
isSecurityDefinitionsItem_Oneof()
}
type SecurityDefinitionsItem_BasicAuthenticationSecurity struct {
BasicAuthenticationSecurity *BasicAuthenticationSecurity `protobuf:"bytes,1,opt,name=basic_authentication_security,json=basicAuthenticationSecurity,proto3,oneof"`
}
type SecurityDefinitionsItem_ApiKeySecurity struct {
ApiKeySecurity *ApiKeySecurity `protobuf:"bytes,2,opt,name=api_key_security,json=apiKeySecurity,proto3,oneof"`
}
type SecurityDefinitionsItem_Oauth2ImplicitSecurity struct {
Oauth2ImplicitSecurity *Oauth2ImplicitSecurity `protobuf:"bytes,3,opt,name=oauth2_implicit_security,json=oauth2ImplicitSecurity,proto3,oneof"`
}
type SecurityDefinitionsItem_Oauth2PasswordSecurity struct {
Oauth2PasswordSecurity *Oauth2PasswordSecurity `protobuf:"bytes,4,opt,name=oauth2_password_security,json=oauth2PasswordSecurity,proto3,oneof"`
}
type SecurityDefinitionsItem_Oauth2ApplicationSecurity struct {
Oauth2ApplicationSecurity *Oauth2ApplicationSecurity `protobuf:"bytes,5,opt,name=oauth2_application_security,json=oauth2ApplicationSecurity,proto3,oneof"`
}
type SecurityDefinitionsItem_Oauth2AccessCodeSecurity struct {
Oauth2AccessCodeSecurity *Oauth2AccessCodeSecurity `protobuf:"bytes,6,opt,name=oauth2_access_code_security,json=oauth2AccessCodeSecurity,proto3,oneof"`
}
func (*SecurityDefinitionsItem_BasicAuthenticationSecurity) isSecurityDefinitionsItem_Oneof() {}
func (*SecurityDefinitionsItem_ApiKeySecurity) isSecurityDefinitionsItem_Oneof() {}
func (*SecurityDefinitionsItem_Oauth2ImplicitSecurity) isSecurityDefinitionsItem_Oneof() {}
func (*SecurityDefinitionsItem_Oauth2PasswordSecurity) isSecurityDefinitionsItem_Oneof() {}
func (*SecurityDefinitionsItem_Oauth2ApplicationSecurity) isSecurityDefinitionsItem_Oneof() {}
func (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity) isSecurityDefinitionsItem_Oneof() {}
type SecurityRequirement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *SecurityRequirement) Reset() {
*x = SecurityRequirement{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityRequirement) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityRequirement) ProtoMessage() {}
func (x *SecurityRequirement) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54]
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 SecurityRequirement.ProtoReflect.Descriptor instead.
func (*SecurityRequirement) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{54}
}
func (x *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type StringArray struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
func (x *StringArray) Reset() {
*x = StringArray{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringArray) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringArray) ProtoMessage() {}
func (x *StringArray) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55]
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 StringArray.ProtoReflect.Descriptor instead.
func (*StringArray) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{55}
}
func (x *StringArray) GetValue() []string {
if x != nil {
return x.Value
}
return nil
}
type Tag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56]
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 Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{56}
}
func (x *Tag) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Tag) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Tag) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Tag) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
type TypeItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
func (x *TypeItem) Reset() {
*x = TypeItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypeItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypeItem) ProtoMessage() {}
func (x *TypeItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57]
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 TypeItem.ProtoReflect.Descriptor instead.
func (*TypeItem) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{57}
}
func (x *TypeItem) GetValue() []string {
if x != nil {
return x.Value
}
return nil
}
// Any property starting with x- is valid.
type VendorExtension struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *VendorExtension) Reset() {
*x = VendorExtension{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VendorExtension) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VendorExtension) ProtoMessage() {}
func (x *VendorExtension) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58]
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 VendorExtension.ProtoReflect.Descriptor instead.
func (*VendorExtension) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{58}
}
func (x *VendorExtension) GetAdditionalProperties() []*NamedAny {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Xml struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
Attribute bool `protobuf:"varint,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
Wrapped bool `protobuf:"varint,5,opt,name=wrapped,proto3" json:"wrapped,omitempty"`
VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension,proto3" json:"vendor_extension,omitempty"`
}
func (x *Xml) Reset() {
*x = Xml{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Xml) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Xml) ProtoMessage() {}
func (x *Xml) ProtoReflect() protoreflect.Message {
mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59]
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 Xml.ProtoReflect.Descriptor instead.
func (*Xml) Descriptor() ([]byte, []int) {
return file_openapiv2_OpenAPIv2_proto_rawDescGZIP(), []int{59}
}
func (x *Xml) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Xml) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Xml) GetPrefix() string {
if x != nil {
return x.Prefix
}
return ""
}
func (x *Xml) GetAttribute() bool {
if x != nil {
return x.Attribute
}
return false
}
func (x *Xml) GetWrapped() bool {
if x != nil {
return x.Wrapped
}
return false
}
func (x *Xml) GetVendorExtension() []*NamedAny {
if x != nil {
return x.VendorExtension
}
return nil
}
var File_openapiv2_OpenAPIv2_proto protoreflect.FileDescriptor
var file_openapiv2_OpenAPIv2_proto_rawDesc = []byte{
0x0a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x4f, 0x70, 0x65, 0x6e,
0x41, 0x50, 0x49, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2c,
0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65,
0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x07,
0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52,
0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f,
0x66, 0x22, 0x45, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x22, 0xab, 0x01, 0x0a, 0x0e, 0x41, 0x70, 0x69,
0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x1b, 0x42, 0x61, 0x73, 0x69, 0x63,
0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10,
0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65,
0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xde, 0x01,
0x0a, 0x0d, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12,
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a,
0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76,
0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x86,
0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72,
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x12, 0x49, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x5b, 0x0a,
0x0b, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x15,
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xe8, 0x05, 0x0a, 0x08, 0x44,
0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65,
0x72, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66,
0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62,
0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65,
0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d,
0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09,
0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x61,
0x74, 0x68, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x05, 0x70, 0x61,
0x74, 0x68, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40,
0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12,
0x3b, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53,
0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x14,
0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63,
0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x12, 0x23, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52,
0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x44, 0x6f, 0x63, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x08, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x73, 0x12, 0x49, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x83, 0x01, 0x0a,
0x0c, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
0x6c, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0xff, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 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, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09,
0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0xab, 0x06, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74,
0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65,
0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74,
0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66,
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a,
0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52,
0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d,
0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f,
0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12,
0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01,
0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e,
0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d,
0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e,
0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18,
0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b,
0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71,
0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65,
0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d,
0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18,
0x16, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f,
0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0xab, 0x05, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11,
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18,
0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b,
0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75,
0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69,
0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69,
0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d,
0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18,
0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68,
0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61,
0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d,
0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71,
0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18,
0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x11, 0x20, 0x01, 0x28,
0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52,
0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x22, 0xfd, 0x05, 0x0a, 0x18, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 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, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76,
0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b,
0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75,
0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07,
0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75,
0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01,
0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e,
0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e,
0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x10, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09,
0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e,
0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69,
0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65,
0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e,
0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75,
0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f,
0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x15, 0x20,
0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12,
0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52,
0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x22, 0x57, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x61,
0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x04, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 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, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66,
0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x2d, 0x0a,
0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x63, 0x65,
0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10,
0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65,
0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a,
0x09, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06,
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x44, 0x0a, 0x0d, 0x4a, 0x73, 0x6f, 0x6e, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x07,
0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x3f, 0x0a,
0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76,
0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x45,
0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x51, 0x0a, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61,
0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x12, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x4b, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x6d, 0x0a, 0x1c, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x37,
0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x55, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5,
0x03, 0x0a, 0x10, 0x4e, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x1b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65,
0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00,
0x52, 0x18, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x6c, 0x0a, 0x1e, 0x66, 0x6f,
0x72, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x46, 0x6f, 0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x66, 0x6f,
0x72, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53,
0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x62, 0x0a, 0x1a, 0x71, 0x75, 0x65, 0x72,
0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f,
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x48, 0x00, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5f, 0x0a, 0x19,
0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73,
0x75, 0x62, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x74,
0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x07, 0x0a,
0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xa1, 0x02, 0x0a, 0x18, 0x4f, 0x61, 0x75, 0x74, 0x68,
0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73,
0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53,
0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x2b, 0x0a,
0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75,
0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e,
0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f,
0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xf5, 0x01, 0x0a, 0x19, 0x4f,
0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77,
0x12, 0x30, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61,
0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70,
0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12,
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x16, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x49, 0x6d, 0x70,
0x6c, 0x69, 0x63, 0x69, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52,
0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72,
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xf2, 0x01, 0x0a, 0x16, 0x4f, 0x61, 0x75, 0x74,
0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x63,
0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63,
0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x76,
0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e,
0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x0c,
0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x15,
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9e, 0x04, 0x0a, 0x09, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74,
0x65, 0x6d, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x33,
0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a,
0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a,
0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a,
0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x63,
0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65,
0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64,
0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x09,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x62, 0x6f, 0x64,
0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42,
0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d,
0x62, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x4c, 0x0a,
0x12, 0x6e, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x42, 0x6f,
0x64, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x22, 0x67, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x15,
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x94, 0x01,
0x0a, 0x0e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74, 0x65, 0x6d,
0x12, 0x35, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x5f,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x73, 0x6f,
0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6a, 0x73,
0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x22, 0xcf, 0x03, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65,
0x6d, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x52, 0x65, 0x66, 0x12, 0x27, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a,
0x03, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x70, 0x6f, 0x73,
0x74, 0x12, 0x2d, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x29, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x05,
0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x05, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x68, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 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,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d,
0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78,
0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76,
0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52,
0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75,
0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76,
0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f,
0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61,
0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e,
0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72,
0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x11, 0x20,
0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a,
0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e,
0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a,
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e,
0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f,
0x66, 0x18, 0x15, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c,
0x65, 0x4f, 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x3f, 0x0a,
0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76,
0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d,
0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50,
0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x92, 0x05,
0x0a, 0x0f, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74,
0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66,
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a,
0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52,
0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d,
0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f,
0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12,
0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01,
0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09,
0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d,
0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e,
0x67, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65,
0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b,
0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71,
0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65,
0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d,
0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18,
0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f,
0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
0x12, 0x4c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa8,
0x06, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x53, 0x75, 0x62, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65,
0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11,
0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01,
0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d,
0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75,
0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69,
0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a,
0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a,
0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70,
0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61,
0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12,
0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69,
0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75,
0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64,
0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfe, 0x01, 0x0a, 0x08, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65,
0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x74, 0x65, 0x6d,
0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64,
0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x07,
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52,
0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e,
0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f,
0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x13, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x4e, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
0x73, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x5f,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4a, 0x73, 0x6f,
0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6a, 0x73,
0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x73, 0x12, 0x43, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63,
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f,
0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x09, 0x0a, 0x06, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66,
0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65,
0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x07, 0x20,
0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11,
0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75,
0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69,
0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e,
0x69, 0x6d, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69,
0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65,
0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10,
0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12,
0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18,
0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d,
0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e,
0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x12,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04,
0x65, 0x6e, 0x75, 0x6d, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12,
0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49,
0x74, 0x65, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x6c, 0x6c, 0x5f, 0x6f, 0x66,
0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x4f,
0x66, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73,
0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12,
0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x1b, 0x20, 0x01,
0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a, 0x03,
0x78, 0x6d, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x58, 0x6d, 0x6c, 0x52, 0x03, 0x78, 0x6d, 0x6c, 0x12,
0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73,
0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73,
0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x29,
0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x79,
0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e,
0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x1f, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f,
0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x0a, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65,
0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06,
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x39, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x65,
0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x5d, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
0x22, 0xe9, 0x04, 0x0a, 0x17, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66,
0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x6d, 0x0a, 0x1d,
0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x1b,
0x62, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x10, 0x61,
0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
0x79, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x69, 0x6d,
0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x49, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69,
0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6f, 0x61, 0x75,
0x74, 0x68, 0x32, 0x49, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6f, 0x61, 0x75,
0x74, 0x68, 0x32, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x1b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x61, 0x70,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48,
0x00, 0x52, 0x19, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x1b,
0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f,
0x64, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f,
0x61, 0x75, 0x74, 0x68, 0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53,
0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x18, 0x6f, 0x61, 0x75, 0x74, 0x68,
0x32, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x68, 0x0a, 0x13,
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d,
0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79,
0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x03,
0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64,
0x6f, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x08, 0x54, 0x79, 0x70,
0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5c, 0x0a, 0x0f, 0x56,
0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49,
0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x03, 0x58, 0x6d,
0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x61,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70,
0x70, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x0f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3e, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x5f, 0x76, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x16, 0x2e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x76, 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x32, 0xa2, 0x02,
0x03, 0x4f, 0x41, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openapiv2_OpenAPIv2_proto_rawDescOnce sync.Once
file_openapiv2_OpenAPIv2_proto_rawDescData = file_openapiv2_OpenAPIv2_proto_rawDesc
)
func file_openapiv2_OpenAPIv2_proto_rawDescGZIP() []byte {
file_openapiv2_OpenAPIv2_proto_rawDescOnce.Do(func() {
file_openapiv2_OpenAPIv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_openapiv2_OpenAPIv2_proto_rawDescData)
})
return file_openapiv2_OpenAPIv2_proto_rawDescData
}
var file_openapiv2_OpenAPIv2_proto_msgTypes = make([]protoimpl.MessageInfo, 60)
var file_openapiv2_OpenAPIv2_proto_goTypes = []interface{}{
(*AdditionalPropertiesItem)(nil), // 0: openapi.v2.AdditionalPropertiesItem
(*Any)(nil), // 1: openapi.v2.Any
(*ApiKeySecurity)(nil), // 2: openapi.v2.ApiKeySecurity
(*BasicAuthenticationSecurity)(nil), // 3: openapi.v2.BasicAuthenticationSecurity
(*BodyParameter)(nil), // 4: openapi.v2.BodyParameter
(*Contact)(nil), // 5: openapi.v2.Contact
(*Default)(nil), // 6: openapi.v2.Default
(*Definitions)(nil), // 7: openapi.v2.Definitions
(*Document)(nil), // 8: openapi.v2.Document
(*Examples)(nil), // 9: openapi.v2.Examples
(*ExternalDocs)(nil), // 10: openapi.v2.ExternalDocs
(*FileSchema)(nil), // 11: openapi.v2.FileSchema
(*FormDataParameterSubSchema)(nil), // 12: openapi.v2.FormDataParameterSubSchema
(*Header)(nil), // 13: openapi.v2.Header
(*HeaderParameterSubSchema)(nil), // 14: openapi.v2.HeaderParameterSubSchema
(*Headers)(nil), // 15: openapi.v2.Headers
(*Info)(nil), // 16: openapi.v2.Info
(*ItemsItem)(nil), // 17: openapi.v2.ItemsItem
(*JsonReference)(nil), // 18: openapi.v2.JsonReference
(*License)(nil), // 19: openapi.v2.License
(*NamedAny)(nil), // 20: openapi.v2.NamedAny
(*NamedHeader)(nil), // 21: openapi.v2.NamedHeader
(*NamedParameter)(nil), // 22: openapi.v2.NamedParameter
(*NamedPathItem)(nil), // 23: openapi.v2.NamedPathItem
(*NamedResponse)(nil), // 24: openapi.v2.NamedResponse
(*NamedResponseValue)(nil), // 25: openapi.v2.NamedResponseValue
(*NamedSchema)(nil), // 26: openapi.v2.NamedSchema
(*NamedSecurityDefinitionsItem)(nil), // 27: openapi.v2.NamedSecurityDefinitionsItem
(*NamedString)(nil), // 28: openapi.v2.NamedString
(*NamedStringArray)(nil), // 29: openapi.v2.NamedStringArray
(*NonBodyParameter)(nil), // 30: openapi.v2.NonBodyParameter
(*Oauth2AccessCodeSecurity)(nil), // 31: openapi.v2.Oauth2AccessCodeSecurity
(*Oauth2ApplicationSecurity)(nil), // 32: openapi.v2.Oauth2ApplicationSecurity
(*Oauth2ImplicitSecurity)(nil), // 33: openapi.v2.Oauth2ImplicitSecurity
(*Oauth2PasswordSecurity)(nil), // 34: openapi.v2.Oauth2PasswordSecurity
(*Oauth2Scopes)(nil), // 35: openapi.v2.Oauth2Scopes
(*Operation)(nil), // 36: openapi.v2.Operation
(*Parameter)(nil), // 37: openapi.v2.Parameter
(*ParameterDefinitions)(nil), // 38: openapi.v2.ParameterDefinitions
(*ParametersItem)(nil), // 39: openapi.v2.ParametersItem
(*PathItem)(nil), // 40: openapi.v2.PathItem
(*PathParameterSubSchema)(nil), // 41: openapi.v2.PathParameterSubSchema
(*Paths)(nil), // 42: openapi.v2.Paths
(*PrimitivesItems)(nil), // 43: openapi.v2.PrimitivesItems
(*Properties)(nil), // 44: openapi.v2.Properties
(*QueryParameterSubSchema)(nil), // 45: openapi.v2.QueryParameterSubSchema
(*Response)(nil), // 46: openapi.v2.Response
(*ResponseDefinitions)(nil), // 47: openapi.v2.ResponseDefinitions
(*ResponseValue)(nil), // 48: openapi.v2.ResponseValue
(*Responses)(nil), // 49: openapi.v2.Responses
(*Schema)(nil), // 50: openapi.v2.Schema
(*SchemaItem)(nil), // 51: openapi.v2.SchemaItem
(*SecurityDefinitions)(nil), // 52: openapi.v2.SecurityDefinitions
(*SecurityDefinitionsItem)(nil), // 53: openapi.v2.SecurityDefinitionsItem
(*SecurityRequirement)(nil), // 54: openapi.v2.SecurityRequirement
(*StringArray)(nil), // 55: openapi.v2.StringArray
(*Tag)(nil), // 56: openapi.v2.Tag
(*TypeItem)(nil), // 57: openapi.v2.TypeItem
(*VendorExtension)(nil), // 58: openapi.v2.VendorExtension
(*Xml)(nil), // 59: openapi.v2.Xml
(*anypb.Any)(nil), // 60: google.protobuf.Any
}
var file_openapiv2_OpenAPIv2_proto_depIdxs = []int32{
50, // 0: openapi.v2.AdditionalPropertiesItem.schema:type_name -> openapi.v2.Schema
60, // 1: openapi.v2.Any.value:type_name -> google.protobuf.Any
20, // 2: openapi.v2.ApiKeySecurity.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 3: openapi.v2.BasicAuthenticationSecurity.vendor_extension:type_name -> openapi.v2.NamedAny
50, // 4: openapi.v2.BodyParameter.schema:type_name -> openapi.v2.Schema
20, // 5: openapi.v2.BodyParameter.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 6: openapi.v2.Contact.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 7: openapi.v2.Default.additional_properties:type_name -> openapi.v2.NamedAny
26, // 8: openapi.v2.Definitions.additional_properties:type_name -> openapi.v2.NamedSchema
16, // 9: openapi.v2.Document.info:type_name -> openapi.v2.Info
42, // 10: openapi.v2.Document.paths:type_name -> openapi.v2.Paths
7, // 11: openapi.v2.Document.definitions:type_name -> openapi.v2.Definitions
38, // 12: openapi.v2.Document.parameters:type_name -> openapi.v2.ParameterDefinitions
47, // 13: openapi.v2.Document.responses:type_name -> openapi.v2.ResponseDefinitions
54, // 14: openapi.v2.Document.security:type_name -> openapi.v2.SecurityRequirement
52, // 15: openapi.v2.Document.security_definitions:type_name -> openapi.v2.SecurityDefinitions
56, // 16: openapi.v2.Document.tags:type_name -> openapi.v2.Tag
10, // 17: openapi.v2.Document.external_docs:type_name -> openapi.v2.ExternalDocs
20, // 18: openapi.v2.Document.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 19: openapi.v2.Examples.additional_properties:type_name -> openapi.v2.NamedAny
20, // 20: openapi.v2.ExternalDocs.vendor_extension:type_name -> openapi.v2.NamedAny
1, // 21: openapi.v2.FileSchema.default:type_name -> openapi.v2.Any
10, // 22: openapi.v2.FileSchema.external_docs:type_name -> openapi.v2.ExternalDocs
1, // 23: openapi.v2.FileSchema.example:type_name -> openapi.v2.Any
20, // 24: openapi.v2.FileSchema.vendor_extension:type_name -> openapi.v2.NamedAny
43, // 25: openapi.v2.FormDataParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems
1, // 26: openapi.v2.FormDataParameterSubSchema.default:type_name -> openapi.v2.Any
1, // 27: openapi.v2.FormDataParameterSubSchema.enum:type_name -> openapi.v2.Any
20, // 28: openapi.v2.FormDataParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny
43, // 29: openapi.v2.Header.items:type_name -> openapi.v2.PrimitivesItems
1, // 30: openapi.v2.Header.default:type_name -> openapi.v2.Any
1, // 31: openapi.v2.Header.enum:type_name -> openapi.v2.Any
20, // 32: openapi.v2.Header.vendor_extension:type_name -> openapi.v2.NamedAny
43, // 33: openapi.v2.HeaderParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems
1, // 34: openapi.v2.HeaderParameterSubSchema.default:type_name -> openapi.v2.Any
1, // 35: openapi.v2.HeaderParameterSubSchema.enum:type_name -> openapi.v2.Any
20, // 36: openapi.v2.HeaderParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny
21, // 37: openapi.v2.Headers.additional_properties:type_name -> openapi.v2.NamedHeader
5, // 38: openapi.v2.Info.contact:type_name -> openapi.v2.Contact
19, // 39: openapi.v2.Info.license:type_name -> openapi.v2.License
20, // 40: openapi.v2.Info.vendor_extension:type_name -> openapi.v2.NamedAny
50, // 41: openapi.v2.ItemsItem.schema:type_name -> openapi.v2.Schema
20, // 42: openapi.v2.License.vendor_extension:type_name -> openapi.v2.NamedAny
1, // 43: openapi.v2.NamedAny.value:type_name -> openapi.v2.Any
13, // 44: openapi.v2.NamedHeader.value:type_name -> openapi.v2.Header
37, // 45: openapi.v2.NamedParameter.value:type_name -> openapi.v2.Parameter
40, // 46: openapi.v2.NamedPathItem.value:type_name -> openapi.v2.PathItem
46, // 47: openapi.v2.NamedResponse.value:type_name -> openapi.v2.Response
48, // 48: openapi.v2.NamedResponseValue.value:type_name -> openapi.v2.ResponseValue
50, // 49: openapi.v2.NamedSchema.value:type_name -> openapi.v2.Schema
53, // 50: openapi.v2.NamedSecurityDefinitionsItem.value:type_name -> openapi.v2.SecurityDefinitionsItem
55, // 51: openapi.v2.NamedStringArray.value:type_name -> openapi.v2.StringArray
14, // 52: openapi.v2.NonBodyParameter.header_parameter_sub_schema:type_name -> openapi.v2.HeaderParameterSubSchema
12, // 53: openapi.v2.NonBodyParameter.form_data_parameter_sub_schema:type_name -> openapi.v2.FormDataParameterSubSchema
45, // 54: openapi.v2.NonBodyParameter.query_parameter_sub_schema:type_name -> openapi.v2.QueryParameterSubSchema
41, // 55: openapi.v2.NonBodyParameter.path_parameter_sub_schema:type_name -> openapi.v2.PathParameterSubSchema
35, // 56: openapi.v2.Oauth2AccessCodeSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes
20, // 57: openapi.v2.Oauth2AccessCodeSecurity.vendor_extension:type_name -> openapi.v2.NamedAny
35, // 58: openapi.v2.Oauth2ApplicationSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes
20, // 59: openapi.v2.Oauth2ApplicationSecurity.vendor_extension:type_name -> openapi.v2.NamedAny
35, // 60: openapi.v2.Oauth2ImplicitSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes
20, // 61: openapi.v2.Oauth2ImplicitSecurity.vendor_extension:type_name -> openapi.v2.NamedAny
35, // 62: openapi.v2.Oauth2PasswordSecurity.scopes:type_name -> openapi.v2.Oauth2Scopes
20, // 63: openapi.v2.Oauth2PasswordSecurity.vendor_extension:type_name -> openapi.v2.NamedAny
28, // 64: openapi.v2.Oauth2Scopes.additional_properties:type_name -> openapi.v2.NamedString
10, // 65: openapi.v2.Operation.external_docs:type_name -> openapi.v2.ExternalDocs
39, // 66: openapi.v2.Operation.parameters:type_name -> openapi.v2.ParametersItem
49, // 67: openapi.v2.Operation.responses:type_name -> openapi.v2.Responses
54, // 68: openapi.v2.Operation.security:type_name -> openapi.v2.SecurityRequirement
20, // 69: openapi.v2.Operation.vendor_extension:type_name -> openapi.v2.NamedAny
4, // 70: openapi.v2.Parameter.body_parameter:type_name -> openapi.v2.BodyParameter
30, // 71: openapi.v2.Parameter.non_body_parameter:type_name -> openapi.v2.NonBodyParameter
22, // 72: openapi.v2.ParameterDefinitions.additional_properties:type_name -> openapi.v2.NamedParameter
37, // 73: openapi.v2.ParametersItem.parameter:type_name -> openapi.v2.Parameter
18, // 74: openapi.v2.ParametersItem.json_reference:type_name -> openapi.v2.JsonReference
36, // 75: openapi.v2.PathItem.get:type_name -> openapi.v2.Operation
36, // 76: openapi.v2.PathItem.put:type_name -> openapi.v2.Operation
36, // 77: openapi.v2.PathItem.post:type_name -> openapi.v2.Operation
36, // 78: openapi.v2.PathItem.delete:type_name -> openapi.v2.Operation
36, // 79: openapi.v2.PathItem.options:type_name -> openapi.v2.Operation
36, // 80: openapi.v2.PathItem.head:type_name -> openapi.v2.Operation
36, // 81: openapi.v2.PathItem.patch:type_name -> openapi.v2.Operation
39, // 82: openapi.v2.PathItem.parameters:type_name -> openapi.v2.ParametersItem
20, // 83: openapi.v2.PathItem.vendor_extension:type_name -> openapi.v2.NamedAny
43, // 84: openapi.v2.PathParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems
1, // 85: openapi.v2.PathParameterSubSchema.default:type_name -> openapi.v2.Any
1, // 86: openapi.v2.PathParameterSubSchema.enum:type_name -> openapi.v2.Any
20, // 87: openapi.v2.PathParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 88: openapi.v2.Paths.vendor_extension:type_name -> openapi.v2.NamedAny
23, // 89: openapi.v2.Paths.path:type_name -> openapi.v2.NamedPathItem
43, // 90: openapi.v2.PrimitivesItems.items:type_name -> openapi.v2.PrimitivesItems
1, // 91: openapi.v2.PrimitivesItems.default:type_name -> openapi.v2.Any
1, // 92: openapi.v2.PrimitivesItems.enum:type_name -> openapi.v2.Any
20, // 93: openapi.v2.PrimitivesItems.vendor_extension:type_name -> openapi.v2.NamedAny
26, // 94: openapi.v2.Properties.additional_properties:type_name -> openapi.v2.NamedSchema
43, // 95: openapi.v2.QueryParameterSubSchema.items:type_name -> openapi.v2.PrimitivesItems
1, // 96: openapi.v2.QueryParameterSubSchema.default:type_name -> openapi.v2.Any
1, // 97: openapi.v2.QueryParameterSubSchema.enum:type_name -> openapi.v2.Any
20, // 98: openapi.v2.QueryParameterSubSchema.vendor_extension:type_name -> openapi.v2.NamedAny
51, // 99: openapi.v2.Response.schema:type_name -> openapi.v2.SchemaItem
15, // 100: openapi.v2.Response.headers:type_name -> openapi.v2.Headers
9, // 101: openapi.v2.Response.examples:type_name -> openapi.v2.Examples
20, // 102: openapi.v2.Response.vendor_extension:type_name -> openapi.v2.NamedAny
24, // 103: openapi.v2.ResponseDefinitions.additional_properties:type_name -> openapi.v2.NamedResponse
46, // 104: openapi.v2.ResponseValue.response:type_name -> openapi.v2.Response
18, // 105: openapi.v2.ResponseValue.json_reference:type_name -> openapi.v2.JsonReference
25, // 106: openapi.v2.Responses.response_code:type_name -> openapi.v2.NamedResponseValue
20, // 107: openapi.v2.Responses.vendor_extension:type_name -> openapi.v2.NamedAny
1, // 108: openapi.v2.Schema.default:type_name -> openapi.v2.Any
1, // 109: openapi.v2.Schema.enum:type_name -> openapi.v2.Any
0, // 110: openapi.v2.Schema.additional_properties:type_name -> openapi.v2.AdditionalPropertiesItem
57, // 111: openapi.v2.Schema.type:type_name -> openapi.v2.TypeItem
17, // 112: openapi.v2.Schema.items:type_name -> openapi.v2.ItemsItem
50, // 113: openapi.v2.Schema.all_of:type_name -> openapi.v2.Schema
44, // 114: openapi.v2.Schema.properties:type_name -> openapi.v2.Properties
59, // 115: openapi.v2.Schema.xml:type_name -> openapi.v2.Xml
10, // 116: openapi.v2.Schema.external_docs:type_name -> openapi.v2.ExternalDocs
1, // 117: openapi.v2.Schema.example:type_name -> openapi.v2.Any
20, // 118: openapi.v2.Schema.vendor_extension:type_name -> openapi.v2.NamedAny
50, // 119: openapi.v2.SchemaItem.schema:type_name -> openapi.v2.Schema
11, // 120: openapi.v2.SchemaItem.file_schema:type_name -> openapi.v2.FileSchema
27, // 121: openapi.v2.SecurityDefinitions.additional_properties:type_name -> openapi.v2.NamedSecurityDefinitionsItem
3, // 122: openapi.v2.SecurityDefinitionsItem.basic_authentication_security:type_name -> openapi.v2.BasicAuthenticationSecurity
2, // 123: openapi.v2.SecurityDefinitionsItem.api_key_security:type_name -> openapi.v2.ApiKeySecurity
33, // 124: openapi.v2.SecurityDefinitionsItem.oauth2_implicit_security:type_name -> openapi.v2.Oauth2ImplicitSecurity
34, // 125: openapi.v2.SecurityDefinitionsItem.oauth2_password_security:type_name -> openapi.v2.Oauth2PasswordSecurity
32, // 126: openapi.v2.SecurityDefinitionsItem.oauth2_application_security:type_name -> openapi.v2.Oauth2ApplicationSecurity
31, // 127: openapi.v2.SecurityDefinitionsItem.oauth2_access_code_security:type_name -> openapi.v2.Oauth2AccessCodeSecurity
29, // 128: openapi.v2.SecurityRequirement.additional_properties:type_name -> openapi.v2.NamedStringArray
10, // 129: openapi.v2.Tag.external_docs:type_name -> openapi.v2.ExternalDocs
20, // 130: openapi.v2.Tag.vendor_extension:type_name -> openapi.v2.NamedAny
20, // 131: openapi.v2.VendorExtension.additional_properties:type_name -> openapi.v2.NamedAny
20, // 132: openapi.v2.Xml.vendor_extension:type_name -> openapi.v2.NamedAny
133, // [133:133] is the sub-list for method output_type
133, // [133:133] is the sub-list for method input_type
133, // [133:133] is the sub-list for extension type_name
133, // [133:133] is the sub-list for extension extendee
0, // [0:133] is the sub-list for field type_name
}
func init() { file_openapiv2_OpenAPIv2_proto_init() }
func file_openapiv2_OpenAPIv2_proto_init() {
if File_openapiv2_OpenAPIv2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_openapiv2_OpenAPIv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AdditionalPropertiesItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Any); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ApiKeySecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BasicAuthenticationSecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BodyParameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Contact); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Default); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Definitions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Document); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Examples); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExternalDocs); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FormDataParameterSubSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Header); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeaderParameterSubSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Headers); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Info); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ItemsItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*JsonReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*License); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedAny); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedParameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedPathItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedResponseValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedSecurityDefinitionsItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedString); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedStringArray); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NonBodyParameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2AccessCodeSecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2ApplicationSecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2ImplicitSecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2PasswordSecurity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Oauth2Scopes); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Operation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Parameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ParameterDefinitions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ParametersItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PathItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PathParameterSubSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Paths); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PrimitivesItems); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Properties); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryParameterSubSchema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseDefinitions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Responses); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Schema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SchemaItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityDefinitions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityDefinitionsItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityRequirement); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StringArray); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Tag); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TypeItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VendorExtension); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Xml); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_openapiv2_OpenAPIv2_proto_msgTypes[0].OneofWrappers = []interface{}{
(*AdditionalPropertiesItem_Schema)(nil),
(*AdditionalPropertiesItem_Boolean)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[30].OneofWrappers = []interface{}{
(*NonBodyParameter_HeaderParameterSubSchema)(nil),
(*NonBodyParameter_FormDataParameterSubSchema)(nil),
(*NonBodyParameter_QueryParameterSubSchema)(nil),
(*NonBodyParameter_PathParameterSubSchema)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[37].OneofWrappers = []interface{}{
(*Parameter_BodyParameter)(nil),
(*Parameter_NonBodyParameter)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[39].OneofWrappers = []interface{}{
(*ParametersItem_Parameter)(nil),
(*ParametersItem_JsonReference)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[48].OneofWrappers = []interface{}{
(*ResponseValue_Response)(nil),
(*ResponseValue_JsonReference)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[51].OneofWrappers = []interface{}{
(*SchemaItem_Schema)(nil),
(*SchemaItem_FileSchema)(nil),
}
file_openapiv2_OpenAPIv2_proto_msgTypes[53].OneofWrappers = []interface{}{
(*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil),
(*SecurityDefinitionsItem_ApiKeySecurity)(nil),
(*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil),
(*SecurityDefinitionsItem_Oauth2PasswordSecurity)(nil),
(*SecurityDefinitionsItem_Oauth2ApplicationSecurity)(nil),
(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_openapiv2_OpenAPIv2_proto_rawDesc,
NumEnums: 0,
NumMessages: 60,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openapiv2_OpenAPIv2_proto_goTypes,
DependencyIndexes: file_openapiv2_OpenAPIv2_proto_depIdxs,
MessageInfos: file_openapiv2_OpenAPIv2_proto_msgTypes,
}.Build()
File_openapiv2_OpenAPIv2_proto = out.File
file_openapiv2_OpenAPIv2_proto_rawDesc = nil
file_openapiv2_OpenAPIv2_proto_goTypes = nil
file_openapiv2_OpenAPIv2_proto_depIdxs = nil
}
gnostic-models-0.6.8/openapiv2/OpenAPIv2.proto 0000664 0000000 0000000 00000043102 14225377162 0021160 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package openapi.v2;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "org.openapi_v2";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
// The Go package name.
option go_package = "./openapiv2;openapi_v2";
message AdditionalPropertiesItem {
oneof oneof {
Schema schema = 1;
bool boolean = 2;
}
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message ApiKeySecurity {
string type = 1;
string name = 2;
string in = 3;
string description = 4;
repeated NamedAny vendor_extension = 5;
}
message BasicAuthenticationSecurity {
string type = 1;
string description = 2;
repeated NamedAny vendor_extension = 3;
}
message BodyParameter {
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 1;
// The name of the parameter.
string name = 2;
// Determines the location of the parameter.
string in = 3;
// Determines whether or not this parameter is required or optional.
bool required = 4;
Schema schema = 5;
repeated NamedAny vendor_extension = 6;
}
// Contact information for the owners of the API.
message Contact {
// The identifying name of the contact person/organization.
string name = 1;
// The URL pointing to the contact information.
string url = 2;
// The email address of the contact person/organization.
string email = 3;
repeated NamedAny vendor_extension = 4;
}
message Default {
repeated NamedAny additional_properties = 1;
}
// One or more JSON objects describing the schemas being consumed and produced by the API.
message Definitions {
repeated NamedSchema additional_properties = 1;
}
message Document {
// The Swagger version of this document.
string swagger = 1;
Info info = 2;
// The host (name or ip) of the API. Example: 'swagger.io'
string host = 3;
// The base path to the API. Example: '/api'.
string base_path = 4;
// The transfer protocol of the API.
repeated string schemes = 5;
// A list of MIME types accepted by the API.
repeated string consumes = 6;
// A list of MIME types the API can produce.
repeated string produces = 7;
Paths paths = 8;
Definitions definitions = 9;
ParameterDefinitions parameters = 10;
ResponseDefinitions responses = 11;
repeated SecurityRequirement security = 12;
SecurityDefinitions security_definitions = 13;
repeated Tag tags = 14;
ExternalDocs external_docs = 15;
repeated NamedAny vendor_extension = 16;
}
message Examples {
repeated NamedAny additional_properties = 1;
}
// information about external documentation
message ExternalDocs {
string description = 1;
string url = 2;
repeated NamedAny vendor_extension = 3;
}
// A deterministic version of a JSON Schema object.
message FileSchema {
string format = 1;
string title = 2;
string description = 3;
Any default = 4;
repeated string required = 5;
string type = 6;
bool read_only = 7;
ExternalDocs external_docs = 8;
Any example = 9;
repeated NamedAny vendor_extension = 10;
}
message FormDataParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
// allows sending a parameter by name only or with an empty value.
bool allow_empty_value = 5;
string type = 6;
string format = 7;
PrimitivesItems items = 8;
string collection_format = 9;
Any default = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
repeated Any enum = 21;
double multiple_of = 22;
repeated NamedAny vendor_extension = 23;
}
message Header {
string type = 1;
string format = 2;
PrimitivesItems items = 3;
string collection_format = 4;
Any default = 5;
double maximum = 6;
bool exclusive_maximum = 7;
double minimum = 8;
bool exclusive_minimum = 9;
int64 max_length = 10;
int64 min_length = 11;
string pattern = 12;
int64 max_items = 13;
int64 min_items = 14;
bool unique_items = 15;
repeated Any enum = 16;
double multiple_of = 17;
string description = 18;
repeated NamedAny vendor_extension = 19;
}
message HeaderParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
string type = 5;
string format = 6;
PrimitivesItems items = 7;
string collection_format = 8;
Any default = 9;
double maximum = 10;
bool exclusive_maximum = 11;
double minimum = 12;
bool exclusive_minimum = 13;
int64 max_length = 14;
int64 min_length = 15;
string pattern = 16;
int64 max_items = 17;
int64 min_items = 18;
bool unique_items = 19;
repeated Any enum = 20;
double multiple_of = 21;
repeated NamedAny vendor_extension = 22;
}
message Headers {
repeated NamedHeader additional_properties = 1;
}
// General information about the API.
message Info {
// A unique and precise title of the API.
string title = 1;
// A semantic version number of the API.
string version = 2;
// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
string description = 3;
// The terms of service for the API.
string terms_of_service = 4;
Contact contact = 5;
License license = 6;
repeated NamedAny vendor_extension = 7;
}
message ItemsItem {
repeated Schema schema = 1;
}
message JsonReference {
string _ref = 1;
string description = 2;
}
message License {
// The name of the license type. It's encouraged to use an OSI compatible license.
string name = 1;
// The URL pointing to the license.
string url = 2;
repeated NamedAny vendor_extension = 3;
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
message NamedAny {
// Map key
string name = 1;
// Mapped value
Any value = 2;
}
// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
message NamedHeader {
// Map key
string name = 1;
// Mapped value
Header value = 2;
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
message NamedParameter {
// Map key
string name = 1;
// Mapped value
Parameter value = 2;
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
message NamedPathItem {
// Map key
string name = 1;
// Mapped value
PathItem value = 2;
}
// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
message NamedResponse {
// Map key
string name = 1;
// Mapped value
Response value = 2;
}
// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
message NamedResponseValue {
// Map key
string name = 1;
// Mapped value
ResponseValue value = 2;
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
message NamedSchema {
// Map key
string name = 1;
// Mapped value
Schema value = 2;
}
// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
message NamedSecurityDefinitionsItem {
// Map key
string name = 1;
// Mapped value
SecurityDefinitionsItem value = 2;
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
message NamedString {
// Map key
string name = 1;
// Mapped value
string value = 2;
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
message NamedStringArray {
// Map key
string name = 1;
// Mapped value
StringArray value = 2;
}
message NonBodyParameter {
oneof oneof {
HeaderParameterSubSchema header_parameter_sub_schema = 1;
FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
QueryParameterSubSchema query_parameter_sub_schema = 3;
PathParameterSubSchema path_parameter_sub_schema = 4;
}
}
message Oauth2AccessCodeSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string authorization_url = 4;
string token_url = 5;
string description = 6;
repeated NamedAny vendor_extension = 7;
}
message Oauth2ApplicationSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string token_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2ImplicitSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string authorization_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2PasswordSecurity {
string type = 1;
string flow = 2;
Oauth2Scopes scopes = 3;
string token_url = 4;
string description = 5;
repeated NamedAny vendor_extension = 6;
}
message Oauth2Scopes {
repeated NamedString additional_properties = 1;
}
message Operation {
repeated string tags = 1;
// A brief summary of the operation.
string summary = 2;
// A longer description of the operation, GitHub Flavored Markdown is allowed.
string description = 3;
ExternalDocs external_docs = 4;
// A unique identifier of the operation.
string operation_id = 5;
// A list of MIME types the API can produce.
repeated string produces = 6;
// A list of MIME types the API can consume.
repeated string consumes = 7;
// The parameters needed to send a valid API call.
repeated ParametersItem parameters = 8;
Responses responses = 9;
// The transfer protocol of the API.
repeated string schemes = 10;
bool deprecated = 11;
repeated SecurityRequirement security = 12;
repeated NamedAny vendor_extension = 13;
}
message Parameter {
oneof oneof {
BodyParameter body_parameter = 1;
NonBodyParameter non_body_parameter = 2;
}
}
// One or more JSON representations for parameters
message ParameterDefinitions {
repeated NamedParameter additional_properties = 1;
}
message ParametersItem {
oneof oneof {
Parameter parameter = 1;
JsonReference json_reference = 2;
}
}
message PathItem {
string _ref = 1;
Operation get = 2;
Operation put = 3;
Operation post = 4;
Operation delete = 5;
Operation options = 6;
Operation head = 7;
Operation patch = 8;
// The parameters needed to send a valid API call.
repeated ParametersItem parameters = 9;
repeated NamedAny vendor_extension = 10;
}
message PathParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
string type = 5;
string format = 6;
PrimitivesItems items = 7;
string collection_format = 8;
Any default = 9;
double maximum = 10;
bool exclusive_maximum = 11;
double minimum = 12;
bool exclusive_minimum = 13;
int64 max_length = 14;
int64 min_length = 15;
string pattern = 16;
int64 max_items = 17;
int64 min_items = 18;
bool unique_items = 19;
repeated Any enum = 20;
double multiple_of = 21;
repeated NamedAny vendor_extension = 22;
}
// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
message Paths {
repeated NamedAny vendor_extension = 1;
repeated NamedPathItem path = 2;
}
message PrimitivesItems {
string type = 1;
string format = 2;
PrimitivesItems items = 3;
string collection_format = 4;
Any default = 5;
double maximum = 6;
bool exclusive_maximum = 7;
double minimum = 8;
bool exclusive_minimum = 9;
int64 max_length = 10;
int64 min_length = 11;
string pattern = 12;
int64 max_items = 13;
int64 min_items = 14;
bool unique_items = 15;
repeated Any enum = 16;
double multiple_of = 17;
repeated NamedAny vendor_extension = 18;
}
message Properties {
repeated NamedSchema additional_properties = 1;
}
message QueryParameterSubSchema {
// Determines whether or not this parameter is required or optional.
bool required = 1;
// Determines the location of the parameter.
string in = 2;
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
string description = 3;
// The name of the parameter.
string name = 4;
// allows sending a parameter by name only or with an empty value.
bool allow_empty_value = 5;
string type = 6;
string format = 7;
PrimitivesItems items = 8;
string collection_format = 9;
Any default = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
repeated Any enum = 21;
double multiple_of = 22;
repeated NamedAny vendor_extension = 23;
}
message Response {
string description = 1;
SchemaItem schema = 2;
Headers headers = 3;
Examples examples = 4;
repeated NamedAny vendor_extension = 5;
}
// One or more JSON representations for responses
message ResponseDefinitions {
repeated NamedResponse additional_properties = 1;
}
message ResponseValue {
oneof oneof {
Response response = 1;
JsonReference json_reference = 2;
}
}
// Response objects names can either be any valid HTTP status code or 'default'.
message Responses {
repeated NamedResponseValue response_code = 1;
repeated NamedAny vendor_extension = 2;
}
// A deterministic version of a JSON Schema object.
message Schema {
string _ref = 1;
string format = 2;
string title = 3;
string description = 4;
Any default = 5;
double multiple_of = 6;
double maximum = 7;
bool exclusive_maximum = 8;
double minimum = 9;
bool exclusive_minimum = 10;
int64 max_length = 11;
int64 min_length = 12;
string pattern = 13;
int64 max_items = 14;
int64 min_items = 15;
bool unique_items = 16;
int64 max_properties = 17;
int64 min_properties = 18;
repeated string required = 19;
repeated Any enum = 20;
AdditionalPropertiesItem additional_properties = 21;
TypeItem type = 22;
ItemsItem items = 23;
repeated Schema all_of = 24;
Properties properties = 25;
string discriminator = 26;
bool read_only = 27;
Xml xml = 28;
ExternalDocs external_docs = 29;
Any example = 30;
repeated NamedAny vendor_extension = 31;
}
message SchemaItem {
oneof oneof {
Schema schema = 1;
FileSchema file_schema = 2;
}
}
message SecurityDefinitions {
repeated NamedSecurityDefinitionsItem additional_properties = 1;
}
message SecurityDefinitionsItem {
oneof oneof {
BasicAuthenticationSecurity basic_authentication_security = 1;
ApiKeySecurity api_key_security = 2;
Oauth2ImplicitSecurity oauth2_implicit_security = 3;
Oauth2PasswordSecurity oauth2_password_security = 4;
Oauth2ApplicationSecurity oauth2_application_security = 5;
Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
}
}
message SecurityRequirement {
repeated NamedStringArray additional_properties = 1;
}
message StringArray {
repeated string value = 1;
}
message Tag {
string name = 1;
string description = 2;
ExternalDocs external_docs = 3;
repeated NamedAny vendor_extension = 4;
}
message TypeItem {
repeated string value = 1;
}
// Any property starting with x- is valid.
message VendorExtension {
repeated NamedAny additional_properties = 1;
}
message Xml {
string name = 1;
string namespace = 2;
string prefix = 3;
bool attribute = 4;
bool wrapped = 5;
repeated NamedAny vendor_extension = 6;
}
gnostic-models-0.6.8/openapiv2/README.md 0000664 0000000 0000000 00000001205 14225377162 0017645 0 ustar 00root root 0000000 0000000 # OpenAPI v2 Protocol Buffer Models
This directory contains a Protocol Buffer-language model and related code for
supporting OpenAPI v2.
Gnostic applications and plugins can use OpenAPIv2.proto to generate Protocol
Buffer support code for their preferred languages.
OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI descriptions into
the Protocol Buffer-based datastructures generated from OpenAPIv2.proto.
OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic compiler
generator, and OpenAPIv2.pb.go is generated by protoc, the Protocol Buffer
compiler, and protoc-gen-go, the Protocol Buffer Go code generation plugin.
gnostic-models-0.6.8/openapiv2/document.go 0000664 0000000 0000000 00000002512 14225377162 0020535 0 ustar 00root root 0000000 0000000 // 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.
package openapi_v2
import (
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/compiler"
)
// ParseDocument reads an OpenAPI v2 description from a YAML/JSON representation.
func ParseDocument(b []byte) (*Document, error) {
info, err := compiler.ReadInfoFromBytes("", b)
if err != nil {
return nil, err
}
root := info.Content[0]
return NewDocument(root, compiler.NewContextWithExtensions("$root", root, nil, nil))
}
// YAMLValue produces a serialized YAML representation of the document.
func (d *Document) YAMLValue(comment string) ([]byte, error) {
rawInfo := d.ToRawInfo()
rawInfo = &yaml.Node{
Kind: yaml.DocumentNode,
Content: []*yaml.Node{rawInfo},
HeadComment: comment,
}
return yaml.Marshal(rawInfo)
}
gnostic-models-0.6.8/openapiv2/openapi-2.0.json 0000664 0000000 0000000 00000116566 14225377162 0021232 0 ustar 00root root 0000000 0000000 {
"title": "A JSON Schema for Swagger 2.0 API.",
"id": "http://swagger.io/v2/schema.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"swagger",
"info",
"paths"
],
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"swagger": {
"type": "string",
"enum": [
"2.0"
],
"description": "The Swagger version of this document."
},
"info": {
"$ref": "#/definitions/info"
},
"host": {
"type": "string",
"pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
"description": "The host (name or ip) of the API. Example: 'swagger.io'"
},
"basePath": {
"type": "string",
"pattern": "^/",
"description": "The base path to the API. Example: '/api'."
},
"schemes": {
"$ref": "#/definitions/schemesList"
},
"consumes": {
"description": "A list of MIME types accepted by the API.",
"allOf": [
{
"$ref": "#/definitions/mediaTypeList"
}
]
},
"produces": {
"description": "A list of MIME types the API can produce.",
"allOf": [
{
"$ref": "#/definitions/mediaTypeList"
}
]
},
"paths": {
"$ref": "#/definitions/paths"
},
"definitions": {
"$ref": "#/definitions/definitions"
},
"parameters": {
"$ref": "#/definitions/parameterDefinitions"
},
"responses": {
"$ref": "#/definitions/responseDefinitions"
},
"security": {
"$ref": "#/definitions/security"
},
"securityDefinitions": {
"$ref": "#/definitions/securityDefinitions"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/tag"
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
}
},
"definitions": {
"info": {
"type": "object",
"description": "General information about the API.",
"required": [
"version",
"title"
],
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"title": {
"type": "string",
"description": "A unique and precise title of the API."
},
"version": {
"type": "string",
"description": "A semantic version number of the API."
},
"description": {
"type": "string",
"description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."
},
"termsOfService": {
"type": "string",
"description": "The terms of service for the API."
},
"contact": {
"$ref": "#/definitions/contact"
},
"license": {
"$ref": "#/definitions/license"
}
}
},
"contact": {
"type": "object",
"description": "Contact information for the owners of the API.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The identifying name of the contact person/organization."
},
"url": {
"type": "string",
"description": "The URL pointing to the contact information.",
"format": "uri"
},
"email": {
"type": "string",
"description": "The email address of the contact person/organization.",
"format": "email"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"license": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the license type. It's encouraged to use an OSI compatible license."
},
"url": {
"type": "string",
"description": "The URL pointing to the license.",
"format": "uri"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"paths": {
"type": "object",
"description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
},
"^/": {
"$ref": "#/definitions/pathItem"
}
},
"additionalProperties": false
},
"definitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"description": "One or more JSON objects describing the schemas being consumed and produced by the API."
},
"parameterDefinitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/parameter"
},
"description": "One or more JSON representations for parameters"
},
"responseDefinitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/response"
},
"description": "One or more JSON representations for responses"
},
"externalDocs": {
"type": "object",
"additionalProperties": false,
"description": "information about external documentation",
"required": [
"url"
],
"properties": {
"description": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"examples": {
"type": "object",
"additionalProperties": true
},
"mimeType": {
"type": "string",
"description": "The MIME type of the HTTP message."
},
"operation": {
"type": "object",
"required": [
"responses"
],
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"summary": {
"type": "string",
"description": "A brief summary of the operation."
},
"description": {
"type": "string",
"description": "A longer description of the operation, GitHub Flavored Markdown is allowed."
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"operationId": {
"type": "string",
"description": "A unique identifier of the operation."
},
"produces": {
"description": "A list of MIME types the API can produce.",
"allOf": [
{
"$ref": "#/definitions/mediaTypeList"
}
]
},
"consumes": {
"description": "A list of MIME types the API can consume.",
"allOf": [
{
"$ref": "#/definitions/mediaTypeList"
}
]
},
"parameters": {
"$ref": "#/definitions/parametersList"
},
"responses": {
"$ref": "#/definitions/responses"
},
"schemes": {
"$ref": "#/definitions/schemesList"
},
"deprecated": {
"type": "boolean",
"default": false
},
"security": {
"$ref": "#/definitions/security"
}
}
},
"pathItem": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"$ref": {
"type": "string"
},
"get": {
"$ref": "#/definitions/operation"
},
"put": {
"$ref": "#/definitions/operation"
},
"post": {
"$ref": "#/definitions/operation"
},
"delete": {
"$ref": "#/definitions/operation"
},
"options": {
"$ref": "#/definitions/operation"
},
"head": {
"$ref": "#/definitions/operation"
},
"patch": {
"$ref": "#/definitions/operation"
},
"parameters": {
"$ref": "#/definitions/parametersList"
}
}
},
"responses": {
"type": "object",
"description": "Response objects names can either be any valid HTTP status code or 'default'.",
"minProperties": 1,
"additionalProperties": false,
"patternProperties": {
"^([0-9]{3})$|^(default)$": {
"$ref": "#/definitions/responseValue"
},
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"not": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
}
},
"responseValue": {
"oneOf": [
{
"$ref": "#/definitions/response"
},
{
"$ref": "#/definitions/jsonReference"
}
]
},
"response": {
"type": "object",
"required": [
"description"
],
"properties": {
"description": {
"type": "string"
},
"schema": {
"oneOf": [
{
"$ref": "#/definitions/schema"
},
{
"$ref": "#/definitions/fileSchema"
}
]
},
"headers": {
"$ref": "#/definitions/headers"
},
"examples": {
"$ref": "#/definitions/examples"
}
},
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"headers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/header"
}
},
"header": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"integer",
"boolean",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"vendorExtension": {
"description": "Any property starting with x- is valid.",
"additionalProperties": true,
"additionalItems": true
},
"bodyParameter": {
"type": "object",
"required": [
"name",
"in",
"schema"
],
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"body"
]
},
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"schema": {
"$ref": "#/definitions/schema"
}
},
"additionalProperties": false
},
"headerParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"header"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"queryParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"query"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"allowEmptyValue": {
"type": "boolean",
"default": false,
"description": "allows sending a parameter by name only or with an empty value."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormatWithMulti"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"formDataParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"formData"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"allowEmptyValue": {
"type": "boolean",
"default": false,
"description": "allows sending a parameter by name only or with an empty value."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array",
"file"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormatWithMulti"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"pathParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"required": [
"required"
],
"properties": {
"required": {
"type": "boolean",
"enum": [
true
],
"description": "Determines whether or not this parameter is required or optional."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"path"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"nonBodyParameter": {
"type": "object",
"required": [
"name",
"in",
"type"
],
"oneOf": [
{
"$ref": "#/definitions/headerParameterSubSchema"
},
{
"$ref": "#/definitions/formDataParameterSubSchema"
},
{
"$ref": "#/definitions/queryParameterSubSchema"
},
{
"$ref": "#/definitions/pathParameterSubSchema"
}
]
},
"parameter": {
"oneOf": [
{
"$ref": "#/definitions/bodyParameter"
},
{
"$ref": "#/definitions/nonBodyParameter"
}
]
},
"schema": {
"type": "object",
"description": "A deterministic version of a JSON Schema object.",
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"$ref": {
"type": "string"
},
"format": {
"type": "string"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"multipleOf": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"pattern": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
},
"maxItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"uniqueItems": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
},
"maxProperties": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minProperties": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"required": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"additionalProperties": {
"oneOf": [
{
"$ref": "#/definitions/schema"
},
{
"type": "boolean"
}
],
"default": {}
},
"type": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/type"
},
"items": {
"anyOf": [
{
"$ref": "#/definitions/schema"
},
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/schema"
}
}
],
"default": {}
},
"allOf": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/schema"
}
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"default": {}
},
"discriminator": {
"type": "string"
},
"readOnly": {
"type": "boolean",
"default": false
},
"xml": {
"$ref": "#/definitions/xml"
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"example": {}
},
"additionalProperties": false
},
"fileSchema": {
"type": "object",
"description": "A deterministic version of a JSON Schema object.",
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"required": [
"type"
],
"properties": {
"format": {
"type": "string"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"required": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
},
"type": {
"type": "string",
"enum": [
"file"
]
},
"readOnly": {
"type": "boolean",
"default": false
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"example": {}
},
"additionalProperties": false
},
"primitivesItems": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"integer",
"boolean",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"security": {
"type": "array",
"items": {
"$ref": "#/definitions/securityRequirement"
},
"uniqueItems": true
},
"securityRequirement": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"xml": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"prefix": {
"type": "string"
},
"attribute": {
"type": "boolean",
"default": false
},
"wrapped": {
"type": "boolean",
"default": false
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"tag": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"securityDefinitions": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "#/definitions/basicAuthenticationSecurity"
},
{
"$ref": "#/definitions/apiKeySecurity"
},
{
"$ref": "#/definitions/oauth2ImplicitSecurity"
},
{
"$ref": "#/definitions/oauth2PasswordSecurity"
},
{
"$ref": "#/definitions/oauth2ApplicationSecurity"
},
{
"$ref": "#/definitions/oauth2AccessCodeSecurity"
}
]
}
},
"basicAuthenticationSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"basic"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"apiKeySecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"name",
"in"
],
"properties": {
"type": {
"type": "string",
"enum": [
"apiKey"
]
},
"name": {
"type": "string"
},
"in": {
"type": "string",
"enum": [
"header",
"query"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2ImplicitSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"authorizationUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"implicit"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"authorizationUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2PasswordSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"password"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2ApplicationSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"application"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2AccessCodeSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"authorizationUrl",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"accessCode"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"authorizationUrl": {
"type": "string",
"format": "uri"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2Scopes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"mediaTypeList": {
"type": "array",
"items": {
"$ref": "#/definitions/mimeType"
},
"uniqueItems": true
},
"parametersList": {
"type": "array",
"description": "The parameters needed to send a valid API call.",
"additionalItems": false,
"items": {
"oneOf": [
{
"$ref": "#/definitions/parameter"
},
{
"$ref": "#/definitions/jsonReference"
}
]
},
"uniqueItems": true
},
"schemesList": {
"type": "array",
"description": "The transfer protocol of the API.",
"items": {
"type": "string",
"enum": [
"http",
"https",
"ws",
"wss"
]
},
"uniqueItems": true
},
"collectionFormat": {
"type": "string",
"enum": [
"csv",
"ssv",
"tsv",
"pipes"
],
"default": "csv"
},
"collectionFormatWithMulti": {
"type": "string",
"enum": [
"csv",
"ssv",
"tsv",
"pipes",
"multi"
],
"default": "csv"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"multipleOf": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"pattern": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
},
"maxItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"uniqueItems": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"jsonReference": {
"type": "object",
"required": [
"$ref"
],
"additionalProperties": false,
"properties": {
"$ref": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
} gnostic-models-0.6.8/openapiv3/ 0000775 0000000 0000000 00000000000 14225377162 0016371 5 ustar 00root root 0000000 0000000 gnostic-models-0.6.8/openapiv3/OpenAPIv3.go 0000664 0000000 0000000 00001070726 14225377162 0020441 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
package openapi_v3
import (
"fmt"
"regexp"
"strings"
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/compiler"
)
// Version returns the package name (and OpenAPI version).
func Version() string {
return "openapi_v3"
}
// NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not.
func NewAdditionalPropertiesItem(in *yaml.Node, context *compiler.Context) (*AdditionalPropertiesItem, error) {
errors := make([]error, 0)
x := &AdditionalPropertiesItem{}
matched := false
// SchemaOrReference schema_or_reference = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewSchemaOrReference(m, compiler.NewContext("schemaOrReference", m, context))
if matchingError == nil {
x.Oneof = &AdditionalPropertiesItem_SchemaOrReference{SchemaOrReference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// bool boolean = 2;
boolValue, ok := compiler.BoolForScalarNode(in)
if ok {
x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue}
matched = true
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid AdditionalPropertiesItem")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewAny creates an object of type Any if possible, returning an error if not.
func NewAny(in *yaml.Node, context *compiler.Context) (*Any, error) {
errors := make([]error, 0)
x := &Any{}
bytes := compiler.Marshal(in)
x.Yaml = string(bytes)
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewAnyOrExpression creates an object of type AnyOrExpression if possible, returning an error if not.
func NewAnyOrExpression(in *yaml.Node, context *compiler.Context) (*AnyOrExpression, error) {
errors := make([]error, 0)
x := &AnyOrExpression{}
matched := false
// Any any = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewAny(m, compiler.NewContext("any", m, context))
if matchingError == nil {
x.Oneof = &AnyOrExpression_Any{Any: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Expression expression = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewExpression(m, compiler.NewContext("expression", m, context))
if matchingError == nil {
x.Oneof = &AnyOrExpression_Expression{Expression: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid AnyOrExpression")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewCallback creates an object of type Callback if possible, returning an error if not.
func NewCallback(in *yaml.Node, context *compiler.Context) (*Callback, error) {
errors := make([]error, 0)
x := &Callback{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{}
allowedPatterns := []*regexp.Regexp{pattern0, pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated NamedPathItem path = 1;
// MAP: PathItem ^
x.Path = make([]*NamedPathItem, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if true {
pair := &NamedPathItem{}
pair.Name = k
var err error
pair.Value, err = NewPathItem(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.Path = append(x.Path, pair)
}
}
}
// repeated NamedAny specification_extension = 2;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewCallbackOrReference creates an object of type CallbackOrReference if possible, returning an error if not.
func NewCallbackOrReference(in *yaml.Node, context *compiler.Context) (*CallbackOrReference, error) {
errors := make([]error, 0)
x := &CallbackOrReference{}
matched := false
// Callback callback = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewCallback(m, compiler.NewContext("callback", m, context))
if matchingError == nil {
x.Oneof = &CallbackOrReference_Callback{Callback: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &CallbackOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid CallbackOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewCallbacksOrReferences creates an object of type CallbacksOrReferences if possible, returning an error if not.
func NewCallbacksOrReferences(in *yaml.Node, context *compiler.Context) (*CallbacksOrReferences, error) {
errors := make([]error, 0)
x := &CallbacksOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedCallbackOrReference additional_properties = 1;
// MAP: CallbackOrReference
x.AdditionalProperties = make([]*NamedCallbackOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedCallbackOrReference{}
pair.Name = k
var err error
pair.Value, err = NewCallbackOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewComponents creates an object of type Components if possible, returning an error if not.
func NewComponents(in *yaml.Node, context *compiler.Context) (*Components, error) {
errors := make([]error, 0)
x := &Components{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"callbacks", "examples", "headers", "links", "parameters", "requestBodies", "responses", "schemas", "securitySchemes"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// SchemasOrReferences schemas = 1;
v1 := compiler.MapValueForKey(m, "schemas")
if v1 != nil {
var err error
x.Schemas, err = NewSchemasOrReferences(v1, compiler.NewContext("schemas", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// ResponsesOrReferences responses = 2;
v2 := compiler.MapValueForKey(m, "responses")
if v2 != nil {
var err error
x.Responses, err = NewResponsesOrReferences(v2, compiler.NewContext("responses", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// ParametersOrReferences parameters = 3;
v3 := compiler.MapValueForKey(m, "parameters")
if v3 != nil {
var err error
x.Parameters, err = NewParametersOrReferences(v3, compiler.NewContext("parameters", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// ExamplesOrReferences examples = 4;
v4 := compiler.MapValueForKey(m, "examples")
if v4 != nil {
var err error
x.Examples, err = NewExamplesOrReferences(v4, compiler.NewContext("examples", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// RequestBodiesOrReferences request_bodies = 5;
v5 := compiler.MapValueForKey(m, "requestBodies")
if v5 != nil {
var err error
x.RequestBodies, err = NewRequestBodiesOrReferences(v5, compiler.NewContext("requestBodies", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// HeadersOrReferences headers = 6;
v6 := compiler.MapValueForKey(m, "headers")
if v6 != nil {
var err error
x.Headers, err = NewHeadersOrReferences(v6, compiler.NewContext("headers", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// SecuritySchemesOrReferences security_schemes = 7;
v7 := compiler.MapValueForKey(m, "securitySchemes")
if v7 != nil {
var err error
x.SecuritySchemes, err = NewSecuritySchemesOrReferences(v7, compiler.NewContext("securitySchemes", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// LinksOrReferences links = 8;
v8 := compiler.MapValueForKey(m, "links")
if v8 != nil {
var err error
x.Links, err = NewLinksOrReferences(v8, compiler.NewContext("links", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// CallbacksOrReferences callbacks = 9;
v9 := compiler.MapValueForKey(m, "callbacks")
if v9 != nil {
var err error
x.Callbacks, err = NewCallbacksOrReferences(v9, compiler.NewContext("callbacks", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 10;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewContact creates an object of type Contact if possible, returning an error if not.
func NewContact(in *yaml.Node, context *compiler.Context) (*Contact, error) {
errors := make([]error, 0)
x := &Contact{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"email", "name", "url"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string email = 3;
v3 := compiler.MapValueForKey(m, "email")
if v3 != nil {
x.Email, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for email: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 4;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDefaultType creates an object of type DefaultType if possible, returning an error if not.
func NewDefaultType(in *yaml.Node, context *compiler.Context) (*DefaultType, error) {
errors := make([]error, 0)
x := &DefaultType{}
matched := false
switch in.Tag {
case "!!bool":
var v bool
v, matched = compiler.BoolForScalarNode(in)
x.Oneof = &DefaultType_Boolean{Boolean: v}
case "!!str":
var v string
v, matched = compiler.StringForScalarNode(in)
x.Oneof = &DefaultType_String_{String_: v}
case "!!float":
var v float64
v, matched = compiler.FloatForScalarNode(in)
x.Oneof = &DefaultType_Number{Number: v}
case "!!int":
var v int64
v, matched = compiler.IntForScalarNode(in)
x.Oneof = &DefaultType_Number{Number: float64(v)}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDiscriminator creates an object of type Discriminator if possible, returning an error if not.
func NewDiscriminator(in *yaml.Node, context *compiler.Context) (*Discriminator, error) {
errors := make([]error, 0)
x := &Discriminator{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"propertyName"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"mapping", "propertyName"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string property_name = 1;
v1 := compiler.MapValueForKey(m, "propertyName")
if v1 != nil {
x.PropertyName, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for propertyName: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Strings mapping = 2;
v2 := compiler.MapValueForKey(m, "mapping")
if v2 != nil {
var err error
x.Mapping, err = NewStrings(v2, compiler.NewContext("mapping", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 3;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewDocument creates an object of type Document if possible, returning an error if not.
func NewDocument(in *yaml.Node, context *compiler.Context) (*Document, error) {
errors := make([]error, 0)
x := &Document{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"info", "openapi", "paths"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"components", "externalDocs", "info", "openapi", "paths", "security", "servers", "tags"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string openapi = 1;
v1 := compiler.MapValueForKey(m, "openapi")
if v1 != nil {
x.Openapi, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for openapi: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Info info = 2;
v2 := compiler.MapValueForKey(m, "info")
if v2 != nil {
var err error
x.Info, err = NewInfo(v2, compiler.NewContext("info", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated Server servers = 3;
v3 := compiler.MapValueForKey(m, "servers")
if v3 != nil {
// repeated Server
x.Servers = make([]*Server, 0)
a, ok := compiler.SequenceNodeForNode(v3)
if ok {
for _, item := range a.Content {
y, err := NewServer(item, compiler.NewContext("servers", item, context))
if err != nil {
errors = append(errors, err)
}
x.Servers = append(x.Servers, y)
}
}
}
// Paths paths = 4;
v4 := compiler.MapValueForKey(m, "paths")
if v4 != nil {
var err error
x.Paths, err = NewPaths(v4, compiler.NewContext("paths", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// Components components = 5;
v5 := compiler.MapValueForKey(m, "components")
if v5 != nil {
var err error
x.Components, err = NewComponents(v5, compiler.NewContext("components", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated SecurityRequirement security = 6;
v6 := compiler.MapValueForKey(m, "security")
if v6 != nil {
// repeated SecurityRequirement
x.Security = make([]*SecurityRequirement, 0)
a, ok := compiler.SequenceNodeForNode(v6)
if ok {
for _, item := range a.Content {
y, err := NewSecurityRequirement(item, compiler.NewContext("security", item, context))
if err != nil {
errors = append(errors, err)
}
x.Security = append(x.Security, y)
}
}
}
// repeated Tag tags = 7;
v7 := compiler.MapValueForKey(m, "tags")
if v7 != nil {
// repeated Tag
x.Tags = make([]*Tag, 0)
a, ok := compiler.SequenceNodeForNode(v7)
if ok {
for _, item := range a.Content {
y, err := NewTag(item, compiler.NewContext("tags", item, context))
if err != nil {
errors = append(errors, err)
}
x.Tags = append(x.Tags, y)
}
}
}
// ExternalDocs external_docs = 8;
v8 := compiler.MapValueForKey(m, "externalDocs")
if v8 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v8, compiler.NewContext("externalDocs", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 9;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewEncoding creates an object of type Encoding if possible, returning an error if not.
func NewEncoding(in *yaml.Node, context *compiler.Context) (*Encoding, error) {
errors := make([]error, 0)
x := &Encoding{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"allowReserved", "contentType", "explode", "headers", "style"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string content_type = 1;
v1 := compiler.MapValueForKey(m, "contentType")
if v1 != nil {
x.ContentType, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for contentType: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// HeadersOrReferences headers = 2;
v2 := compiler.MapValueForKey(m, "headers")
if v2 != nil {
var err error
x.Headers, err = NewHeadersOrReferences(v2, compiler.NewContext("headers", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// string style = 3;
v3 := compiler.MapValueForKey(m, "style")
if v3 != nil {
x.Style, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for style: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool explode = 4;
v4 := compiler.MapValueForKey(m, "explode")
if v4 != nil {
x.Explode, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for explode: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_reserved = 5;
v5 := compiler.MapValueForKey(m, "allowReserved")
if v5 != nil {
x.AllowReserved, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for allowReserved: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 6;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewEncodings creates an object of type Encodings if possible, returning an error if not.
func NewEncodings(in *yaml.Node, context *compiler.Context) (*Encodings, error) {
errors := make([]error, 0)
x := &Encodings{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedEncoding additional_properties = 1;
// MAP: Encoding
x.AdditionalProperties = make([]*NamedEncoding, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedEncoding{}
pair.Name = k
var err error
pair.Value, err = NewEncoding(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExample creates an object of type Example if possible, returning an error if not.
func NewExample(in *yaml.Node, context *compiler.Context) (*Example, error) {
errors := make([]error, 0)
x := &Example{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"description", "externalValue", "summary", "value"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string summary = 1;
v1 := compiler.MapValueForKey(m, "summary")
if v1 != nil {
x.Summary, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any value = 3;
v3 := compiler.MapValueForKey(m, "value")
if v3 != nil {
var err error
x.Value, err = NewAny(v3, compiler.NewContext("value", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// string external_value = 4;
v4 := compiler.MapValueForKey(m, "externalValue")
if v4 != nil {
x.ExternalValue, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for externalValue: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 5;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExampleOrReference creates an object of type ExampleOrReference if possible, returning an error if not.
func NewExampleOrReference(in *yaml.Node, context *compiler.Context) (*ExampleOrReference, error) {
errors := make([]error, 0)
x := &ExampleOrReference{}
matched := false
// Example example = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewExample(m, compiler.NewContext("example", m, context))
if matchingError == nil {
x.Oneof = &ExampleOrReference_Example{Example: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &ExampleOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid ExampleOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExamplesOrReferences creates an object of type ExamplesOrReferences if possible, returning an error if not.
func NewExamplesOrReferences(in *yaml.Node, context *compiler.Context) (*ExamplesOrReferences, error) {
errors := make([]error, 0)
x := &ExamplesOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedExampleOrReference additional_properties = 1;
// MAP: ExampleOrReference
x.AdditionalProperties = make([]*NamedExampleOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedExampleOrReference{}
pair.Name = k
var err error
pair.Value, err = NewExampleOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExpression creates an object of type Expression if possible, returning an error if not.
func NewExpression(in *yaml.Node, context *compiler.Context) (*Expression, error) {
errors := make([]error, 0)
x := &Expression{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedAny additional_properties = 1;
// MAP: Any
x.AdditionalProperties = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not.
func NewExternalDocs(in *yaml.Node, context *compiler.Context) (*ExternalDocs, error) {
errors := make([]error, 0)
x := &ExternalDocs{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"url"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "url"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 3;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeader creates an object of type Header if possible, returning an error if not.
func NewHeader(in *yaml.Node, context *compiler.Context) (*Header, error) {
errors := make([]error, 0)
x := &Header{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"allowEmptyValue", "allowReserved", "content", "deprecated", "description", "example", "examples", "explode", "required", "schema", "style"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool required = 2;
v2 := compiler.MapValueForKey(m, "required")
if v2 != nil {
x.Required, ok = compiler.BoolForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool deprecated = 3;
v3 := compiler.MapValueForKey(m, "deprecated")
if v3 != nil {
x.Deprecated, ok = compiler.BoolForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_empty_value = 4;
v4 := compiler.MapValueForKey(m, "allowEmptyValue")
if v4 != nil {
x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string style = 5;
v5 := compiler.MapValueForKey(m, "style")
if v5 != nil {
x.Style, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for style: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool explode = 6;
v6 := compiler.MapValueForKey(m, "explode")
if v6 != nil {
x.Explode, ok = compiler.BoolForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for explode: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_reserved = 7;
v7 := compiler.MapValueForKey(m, "allowReserved")
if v7 != nil {
x.AllowReserved, ok = compiler.BoolForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for allowReserved: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// SchemaOrReference schema = 8;
v8 := compiler.MapValueForKey(m, "schema")
if v8 != nil {
var err error
x.Schema, err = NewSchemaOrReference(v8, compiler.NewContext("schema", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 9;
v9 := compiler.MapValueForKey(m, "example")
if v9 != nil {
var err error
x.Example, err = NewAny(v9, compiler.NewContext("example", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// ExamplesOrReferences examples = 10;
v10 := compiler.MapValueForKey(m, "examples")
if v10 != nil {
var err error
x.Examples, err = NewExamplesOrReferences(v10, compiler.NewContext("examples", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// MediaTypes content = 11;
v11 := compiler.MapValueForKey(m, "content")
if v11 != nil {
var err error
x.Content, err = NewMediaTypes(v11, compiler.NewContext("content", v11, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 12;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeaderOrReference creates an object of type HeaderOrReference if possible, returning an error if not.
func NewHeaderOrReference(in *yaml.Node, context *compiler.Context) (*HeaderOrReference, error) {
errors := make([]error, 0)
x := &HeaderOrReference{}
matched := false
// Header header = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewHeader(m, compiler.NewContext("header", m, context))
if matchingError == nil {
x.Oneof = &HeaderOrReference_Header{Header: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &HeaderOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid HeaderOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewHeadersOrReferences creates an object of type HeadersOrReferences if possible, returning an error if not.
func NewHeadersOrReferences(in *yaml.Node, context *compiler.Context) (*HeadersOrReferences, error) {
errors := make([]error, 0)
x := &HeadersOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedHeaderOrReference additional_properties = 1;
// MAP: HeaderOrReference
x.AdditionalProperties = make([]*NamedHeaderOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedHeaderOrReference{}
pair.Name = k
var err error
pair.Value, err = NewHeaderOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewInfo creates an object of type Info if possible, returning an error if not.
func NewInfo(in *yaml.Node, context *compiler.Context) (*Info, error) {
errors := make([]error, 0)
x := &Info{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"title", "version"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"contact", "description", "license", "summary", "termsOfService", "title", "version"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string title = 1;
v1 := compiler.MapValueForKey(m, "title")
if v1 != nil {
x.Title, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string terms_of_service = 3;
v3 := compiler.MapValueForKey(m, "termsOfService")
if v3 != nil {
x.TermsOfService, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for termsOfService: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// Contact contact = 4;
v4 := compiler.MapValueForKey(m, "contact")
if v4 != nil {
var err error
x.Contact, err = NewContact(v4, compiler.NewContext("contact", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// License license = 5;
v5 := compiler.MapValueForKey(m, "license")
if v5 != nil {
var err error
x.License, err = NewLicense(v5, compiler.NewContext("license", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// string version = 6;
v6 := compiler.MapValueForKey(m, "version")
if v6 != nil {
x.Version, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for version: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string summary = 7;
v7 := compiler.MapValueForKey(m, "summary")
if v7 != nil {
x.Summary, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 8;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewItemsItem creates an object of type ItemsItem if possible, returning an error if not.
func NewItemsItem(in *yaml.Node, context *compiler.Context) (*ItemsItem, error) {
errors := make([]error, 0)
x := &ItemsItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
x.SchemaOrReference = make([]*SchemaOrReference, 0)
y, err := NewSchemaOrReference(m, compiler.NewContext("", m, context))
if err != nil {
return nil, err
}
x.SchemaOrReference = append(x.SchemaOrReference, y)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewLicense creates an object of type License if possible, returning an error if not.
func NewLicense(in *yaml.Node, context *compiler.Context) (*License, error) {
errors := make([]error, 0)
x := &License{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"name"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"name", "url"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string url = 2;
v2 := compiler.MapValueForKey(m, "url")
if v2 != nil {
x.Url, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 3;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewLink creates an object of type Link if possible, returning an error if not.
func NewLink(in *yaml.Node, context *compiler.Context) (*Link, error) {
errors := make([]error, 0)
x := &Link{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"description", "operationId", "operationRef", "parameters", "requestBody", "server"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string operation_ref = 1;
v1 := compiler.MapValueForKey(m, "operationRef")
if v1 != nil {
x.OperationRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for operationRef: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string operation_id = 2;
v2 := compiler.MapValueForKey(m, "operationId")
if v2 != nil {
x.OperationId, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for operationId: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// AnyOrExpression parameters = 3;
v3 := compiler.MapValueForKey(m, "parameters")
if v3 != nil {
var err error
x.Parameters, err = NewAnyOrExpression(v3, compiler.NewContext("parameters", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// AnyOrExpression request_body = 4;
v4 := compiler.MapValueForKey(m, "requestBody")
if v4 != nil {
var err error
x.RequestBody, err = NewAnyOrExpression(v4, compiler.NewContext("requestBody", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// string description = 5;
v5 := compiler.MapValueForKey(m, "description")
if v5 != nil {
x.Description, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// Server server = 6;
v6 := compiler.MapValueForKey(m, "server")
if v6 != nil {
var err error
x.Server, err = NewServer(v6, compiler.NewContext("server", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 7;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewLinkOrReference creates an object of type LinkOrReference if possible, returning an error if not.
func NewLinkOrReference(in *yaml.Node, context *compiler.Context) (*LinkOrReference, error) {
errors := make([]error, 0)
x := &LinkOrReference{}
matched := false
// Link link = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewLink(m, compiler.NewContext("link", m, context))
if matchingError == nil {
x.Oneof = &LinkOrReference_Link{Link: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &LinkOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid LinkOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewLinksOrReferences creates an object of type LinksOrReferences if possible, returning an error if not.
func NewLinksOrReferences(in *yaml.Node, context *compiler.Context) (*LinksOrReferences, error) {
errors := make([]error, 0)
x := &LinksOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedLinkOrReference additional_properties = 1;
// MAP: LinkOrReference
x.AdditionalProperties = make([]*NamedLinkOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedLinkOrReference{}
pair.Name = k
var err error
pair.Value, err = NewLinkOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewMediaType creates an object of type MediaType if possible, returning an error if not.
func NewMediaType(in *yaml.Node, context *compiler.Context) (*MediaType, error) {
errors := make([]error, 0)
x := &MediaType{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"encoding", "example", "examples", "schema"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// SchemaOrReference schema = 1;
v1 := compiler.MapValueForKey(m, "schema")
if v1 != nil {
var err error
x.Schema, err = NewSchemaOrReference(v1, compiler.NewContext("schema", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 2;
v2 := compiler.MapValueForKey(m, "example")
if v2 != nil {
var err error
x.Example, err = NewAny(v2, compiler.NewContext("example", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// ExamplesOrReferences examples = 3;
v3 := compiler.MapValueForKey(m, "examples")
if v3 != nil {
var err error
x.Examples, err = NewExamplesOrReferences(v3, compiler.NewContext("examples", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// Encodings encoding = 4;
v4 := compiler.MapValueForKey(m, "encoding")
if v4 != nil {
var err error
x.Encoding, err = NewEncodings(v4, compiler.NewContext("encoding", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 5;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewMediaTypes creates an object of type MediaTypes if possible, returning an error if not.
func NewMediaTypes(in *yaml.Node, context *compiler.Context) (*MediaTypes, error) {
errors := make([]error, 0)
x := &MediaTypes{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedMediaType additional_properties = 1;
// MAP: MediaType
x.AdditionalProperties = make([]*NamedMediaType, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedMediaType{}
pair.Name = k
var err error
pair.Value, err = NewMediaType(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedAny creates an object of type NamedAny if possible, returning an error if not.
func NewNamedAny(in *yaml.Node, context *compiler.Context) (*NamedAny, error) {
errors := make([]error, 0)
x := &NamedAny{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Any value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewAny(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedCallbackOrReference creates an object of type NamedCallbackOrReference if possible, returning an error if not.
func NewNamedCallbackOrReference(in *yaml.Node, context *compiler.Context) (*NamedCallbackOrReference, error) {
errors := make([]error, 0)
x := &NamedCallbackOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// CallbackOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewCallbackOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedEncoding creates an object of type NamedEncoding if possible, returning an error if not.
func NewNamedEncoding(in *yaml.Node, context *compiler.Context) (*NamedEncoding, error) {
errors := make([]error, 0)
x := &NamedEncoding{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Encoding value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewEncoding(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedExampleOrReference creates an object of type NamedExampleOrReference if possible, returning an error if not.
func NewNamedExampleOrReference(in *yaml.Node, context *compiler.Context) (*NamedExampleOrReference, error) {
errors := make([]error, 0)
x := &NamedExampleOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExampleOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewExampleOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedHeaderOrReference creates an object of type NamedHeaderOrReference if possible, returning an error if not.
func NewNamedHeaderOrReference(in *yaml.Node, context *compiler.Context) (*NamedHeaderOrReference, error) {
errors := make([]error, 0)
x := &NamedHeaderOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// HeaderOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewHeaderOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedLinkOrReference creates an object of type NamedLinkOrReference if possible, returning an error if not.
func NewNamedLinkOrReference(in *yaml.Node, context *compiler.Context) (*NamedLinkOrReference, error) {
errors := make([]error, 0)
x := &NamedLinkOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// LinkOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewLinkOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedMediaType creates an object of type NamedMediaType if possible, returning an error if not.
func NewNamedMediaType(in *yaml.Node, context *compiler.Context) (*NamedMediaType, error) {
errors := make([]error, 0)
x := &NamedMediaType{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// MediaType value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewMediaType(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedParameterOrReference creates an object of type NamedParameterOrReference if possible, returning an error if not.
func NewNamedParameterOrReference(in *yaml.Node, context *compiler.Context) (*NamedParameterOrReference, error) {
errors := make([]error, 0)
x := &NamedParameterOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// ParameterOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewParameterOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not.
func NewNamedPathItem(in *yaml.Node, context *compiler.Context) (*NamedPathItem, error) {
errors := make([]error, 0)
x := &NamedPathItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// PathItem value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewPathItem(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedRequestBodyOrReference creates an object of type NamedRequestBodyOrReference if possible, returning an error if not.
func NewNamedRequestBodyOrReference(in *yaml.Node, context *compiler.Context) (*NamedRequestBodyOrReference, error) {
errors := make([]error, 0)
x := &NamedRequestBodyOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// RequestBodyOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewRequestBodyOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedResponseOrReference creates an object of type NamedResponseOrReference if possible, returning an error if not.
func NewNamedResponseOrReference(in *yaml.Node, context *compiler.Context) (*NamedResponseOrReference, error) {
errors := make([]error, 0)
x := &NamedResponseOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// ResponseOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewResponseOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedSchemaOrReference creates an object of type NamedSchemaOrReference if possible, returning an error if not.
func NewNamedSchemaOrReference(in *yaml.Node, context *compiler.Context) (*NamedSchemaOrReference, error) {
errors := make([]error, 0)
x := &NamedSchemaOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// SchemaOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewSchemaOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedSecuritySchemeOrReference creates an object of type NamedSecuritySchemeOrReference if possible, returning an error if not.
func NewNamedSecuritySchemeOrReference(in *yaml.Node, context *compiler.Context) (*NamedSecuritySchemeOrReference, error) {
errors := make([]error, 0)
x := &NamedSecuritySchemeOrReference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// SecuritySchemeOrReference value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewSecuritySchemeOrReference(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedServerVariable creates an object of type NamedServerVariable if possible, returning an error if not.
func NewNamedServerVariable(in *yaml.Node, context *compiler.Context) (*NamedServerVariable, error) {
errors := make([]error, 0)
x := &NamedServerVariable{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// ServerVariable value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewServerVariable(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedString creates an object of type NamedString if possible, returning an error if not.
func NewNamedString(in *yaml.Node, context *compiler.Context) (*NamedString, error) {
errors := make([]error, 0)
x := &NamedString{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
x.Value, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for value: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewNamedStringArray creates an object of type NamedStringArray if possible, returning an error if not.
func NewNamedStringArray(in *yaml.Node, context *compiler.Context) (*NamedStringArray, error) {
errors := make([]error, 0)
x := &NamedStringArray{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"name", "value"}
var allowedPatterns []*regexp.Regexp
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// StringArray value = 2;
v2 := compiler.MapValueForKey(m, "value")
if v2 != nil {
var err error
x.Value, err = NewStringArray(v2, compiler.NewContext("value", v2, context))
if err != nil {
errors = append(errors, err)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauthFlow creates an object of type OauthFlow if possible, returning an error if not.
func NewOauthFlow(in *yaml.Node, context *compiler.Context) (*OauthFlow, error) {
errors := make([]error, 0)
x := &OauthFlow{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"authorizationUrl", "refreshUrl", "scopes", "tokenUrl"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string authorization_url = 1;
v1 := compiler.MapValueForKey(m, "authorizationUrl")
if v1 != nil {
x.AuthorizationUrl, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for authorizationUrl: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string token_url = 2;
v2 := compiler.MapValueForKey(m, "tokenUrl")
if v2 != nil {
x.TokenUrl, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for tokenUrl: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string refresh_url = 3;
v3 := compiler.MapValueForKey(m, "refreshUrl")
if v3 != nil {
x.RefreshUrl, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for refreshUrl: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// Strings scopes = 4;
v4 := compiler.MapValueForKey(m, "scopes")
if v4 != nil {
var err error
x.Scopes, err = NewStrings(v4, compiler.NewContext("scopes", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 5;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOauthFlows creates an object of type OauthFlows if possible, returning an error if not.
func NewOauthFlows(in *yaml.Node, context *compiler.Context) (*OauthFlows, error) {
errors := make([]error, 0)
x := &OauthFlows{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"authorizationCode", "clientCredentials", "implicit", "password"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// OauthFlow implicit = 1;
v1 := compiler.MapValueForKey(m, "implicit")
if v1 != nil {
var err error
x.Implicit, err = NewOauthFlow(v1, compiler.NewContext("implicit", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// OauthFlow password = 2;
v2 := compiler.MapValueForKey(m, "password")
if v2 != nil {
var err error
x.Password, err = NewOauthFlow(v2, compiler.NewContext("password", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// OauthFlow client_credentials = 3;
v3 := compiler.MapValueForKey(m, "clientCredentials")
if v3 != nil {
var err error
x.ClientCredentials, err = NewOauthFlow(v3, compiler.NewContext("clientCredentials", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// OauthFlow authorization_code = 4;
v4 := compiler.MapValueForKey(m, "authorizationCode")
if v4 != nil {
var err error
x.AuthorizationCode, err = NewOauthFlow(v4, compiler.NewContext("authorizationCode", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 5;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewObject creates an object of type Object if possible, returning an error if not.
func NewObject(in *yaml.Node, context *compiler.Context) (*Object, error) {
errors := make([]error, 0)
x := &Object{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedAny additional_properties = 1;
// MAP: Any
x.AdditionalProperties = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewOperation creates an object of type Operation if possible, returning an error if not.
func NewOperation(in *yaml.Node, context *compiler.Context) (*Operation, error) {
errors := make([]error, 0)
x := &Operation{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"responses"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"callbacks", "deprecated", "description", "externalDocs", "operationId", "parameters", "requestBody", "responses", "security", "servers", "summary", "tags"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated string tags = 1;
v1 := compiler.MapValueForKey(m, "tags")
if v1 != nil {
v, ok := compiler.SequenceNodeForNode(v1)
if ok {
x.Tags = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for tags: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string summary = 2;
v2 := compiler.MapValueForKey(m, "summary")
if v2 != nil {
x.Summary, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExternalDocs external_docs = 4;
v4 := compiler.MapValueForKey(m, "externalDocs")
if v4 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v4, compiler.NewContext("externalDocs", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// string operation_id = 5;
v5 := compiler.MapValueForKey(m, "operationId")
if v5 != nil {
x.OperationId, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for operationId: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated ParameterOrReference parameters = 6;
v6 := compiler.MapValueForKey(m, "parameters")
if v6 != nil {
// repeated ParameterOrReference
x.Parameters = make([]*ParameterOrReference, 0)
a, ok := compiler.SequenceNodeForNode(v6)
if ok {
for _, item := range a.Content {
y, err := NewParameterOrReference(item, compiler.NewContext("parameters", item, context))
if err != nil {
errors = append(errors, err)
}
x.Parameters = append(x.Parameters, y)
}
}
}
// RequestBodyOrReference request_body = 7;
v7 := compiler.MapValueForKey(m, "requestBody")
if v7 != nil {
var err error
x.RequestBody, err = NewRequestBodyOrReference(v7, compiler.NewContext("requestBody", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// Responses responses = 8;
v8 := compiler.MapValueForKey(m, "responses")
if v8 != nil {
var err error
x.Responses, err = NewResponses(v8, compiler.NewContext("responses", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// CallbacksOrReferences callbacks = 9;
v9 := compiler.MapValueForKey(m, "callbacks")
if v9 != nil {
var err error
x.Callbacks, err = NewCallbacksOrReferences(v9, compiler.NewContext("callbacks", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// bool deprecated = 10;
v10 := compiler.MapValueForKey(m, "deprecated")
if v10 != nil {
x.Deprecated, ok = compiler.BoolForScalarNode(v10)
if !ok {
message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated SecurityRequirement security = 11;
v11 := compiler.MapValueForKey(m, "security")
if v11 != nil {
// repeated SecurityRequirement
x.Security = make([]*SecurityRequirement, 0)
a, ok := compiler.SequenceNodeForNode(v11)
if ok {
for _, item := range a.Content {
y, err := NewSecurityRequirement(item, compiler.NewContext("security", item, context))
if err != nil {
errors = append(errors, err)
}
x.Security = append(x.Security, y)
}
}
}
// repeated Server servers = 12;
v12 := compiler.MapValueForKey(m, "servers")
if v12 != nil {
// repeated Server
x.Servers = make([]*Server, 0)
a, ok := compiler.SequenceNodeForNode(v12)
if ok {
for _, item := range a.Content {
y, err := NewServer(item, compiler.NewContext("servers", item, context))
if err != nil {
errors = append(errors, err)
}
x.Servers = append(x.Servers, y)
}
}
}
// repeated NamedAny specification_extension = 13;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameter creates an object of type Parameter if possible, returning an error if not.
func NewParameter(in *yaml.Node, context *compiler.Context) (*Parameter, error) {
errors := make([]error, 0)
x := &Parameter{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"in", "name"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"allowEmptyValue", "allowReserved", "content", "deprecated", "description", "example", "examples", "explode", "in", "name", "required", "schema", "style"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 2;
v2 := compiler.MapValueForKey(m, "in")
if v2 != nil {
x.In, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool required = 4;
v4 := compiler.MapValueForKey(m, "required")
if v4 != nil {
x.Required, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool deprecated = 5;
v5 := compiler.MapValueForKey(m, "deprecated")
if v5 != nil {
x.Deprecated, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_empty_value = 6;
v6 := compiler.MapValueForKey(m, "allowEmptyValue")
if v6 != nil {
x.AllowEmptyValue, ok = compiler.BoolForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for allowEmptyValue: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// string style = 7;
v7 := compiler.MapValueForKey(m, "style")
if v7 != nil {
x.Style, ok = compiler.StringForScalarNode(v7)
if !ok {
message := fmt.Sprintf("has unexpected value for style: %s", compiler.Display(v7))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool explode = 8;
v8 := compiler.MapValueForKey(m, "explode")
if v8 != nil {
x.Explode, ok = compiler.BoolForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for explode: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool allow_reserved = 9;
v9 := compiler.MapValueForKey(m, "allowReserved")
if v9 != nil {
x.AllowReserved, ok = compiler.BoolForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for allowReserved: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// SchemaOrReference schema = 10;
v10 := compiler.MapValueForKey(m, "schema")
if v10 != nil {
var err error
x.Schema, err = NewSchemaOrReference(v10, compiler.NewContext("schema", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 11;
v11 := compiler.MapValueForKey(m, "example")
if v11 != nil {
var err error
x.Example, err = NewAny(v11, compiler.NewContext("example", v11, context))
if err != nil {
errors = append(errors, err)
}
}
// ExamplesOrReferences examples = 12;
v12 := compiler.MapValueForKey(m, "examples")
if v12 != nil {
var err error
x.Examples, err = NewExamplesOrReferences(v12, compiler.NewContext("examples", v12, context))
if err != nil {
errors = append(errors, err)
}
}
// MediaTypes content = 13;
v13 := compiler.MapValueForKey(m, "content")
if v13 != nil {
var err error
x.Content, err = NewMediaTypes(v13, compiler.NewContext("content", v13, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 14;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParameterOrReference creates an object of type ParameterOrReference if possible, returning an error if not.
func NewParameterOrReference(in *yaml.Node, context *compiler.Context) (*ParameterOrReference, error) {
errors := make([]error, 0)
x := &ParameterOrReference{}
matched := false
// Parameter parameter = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewParameter(m, compiler.NewContext("parameter", m, context))
if matchingError == nil {
x.Oneof = &ParameterOrReference_Parameter{Parameter: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &ParameterOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid ParameterOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewParametersOrReferences creates an object of type ParametersOrReferences if possible, returning an error if not.
func NewParametersOrReferences(in *yaml.Node, context *compiler.Context) (*ParametersOrReferences, error) {
errors := make([]error, 0)
x := &ParametersOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedParameterOrReference additional_properties = 1;
// MAP: ParameterOrReference
x.AdditionalProperties = make([]*NamedParameterOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedParameterOrReference{}
pair.Name = k
var err error
pair.Value, err = NewParameterOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPathItem creates an object of type PathItem if possible, returning an error if not.
func NewPathItem(in *yaml.Node, context *compiler.Context) (*PathItem, error) {
errors := make([]error, 0)
x := &PathItem{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"$ref", "delete", "description", "get", "head", "options", "parameters", "patch", "post", "put", "servers", "summary", "trace"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string summary = 2;
v2 := compiler.MapValueForKey(m, "summary")
if v2 != nil {
x.Summary, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// Operation get = 4;
v4 := compiler.MapValueForKey(m, "get")
if v4 != nil {
var err error
x.Get, err = NewOperation(v4, compiler.NewContext("get", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation put = 5;
v5 := compiler.MapValueForKey(m, "put")
if v5 != nil {
var err error
x.Put, err = NewOperation(v5, compiler.NewContext("put", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation post = 6;
v6 := compiler.MapValueForKey(m, "post")
if v6 != nil {
var err error
x.Post, err = NewOperation(v6, compiler.NewContext("post", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation delete = 7;
v7 := compiler.MapValueForKey(m, "delete")
if v7 != nil {
var err error
x.Delete, err = NewOperation(v7, compiler.NewContext("delete", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation options = 8;
v8 := compiler.MapValueForKey(m, "options")
if v8 != nil {
var err error
x.Options, err = NewOperation(v8, compiler.NewContext("options", v8, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation head = 9;
v9 := compiler.MapValueForKey(m, "head")
if v9 != nil {
var err error
x.Head, err = NewOperation(v9, compiler.NewContext("head", v9, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation patch = 10;
v10 := compiler.MapValueForKey(m, "patch")
if v10 != nil {
var err error
x.Patch, err = NewOperation(v10, compiler.NewContext("patch", v10, context))
if err != nil {
errors = append(errors, err)
}
}
// Operation trace = 11;
v11 := compiler.MapValueForKey(m, "trace")
if v11 != nil {
var err error
x.Trace, err = NewOperation(v11, compiler.NewContext("trace", v11, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated Server servers = 12;
v12 := compiler.MapValueForKey(m, "servers")
if v12 != nil {
// repeated Server
x.Servers = make([]*Server, 0)
a, ok := compiler.SequenceNodeForNode(v12)
if ok {
for _, item := range a.Content {
y, err := NewServer(item, compiler.NewContext("servers", item, context))
if err != nil {
errors = append(errors, err)
}
x.Servers = append(x.Servers, y)
}
}
}
// repeated ParameterOrReference parameters = 13;
v13 := compiler.MapValueForKey(m, "parameters")
if v13 != nil {
// repeated ParameterOrReference
x.Parameters = make([]*ParameterOrReference, 0)
a, ok := compiler.SequenceNodeForNode(v13)
if ok {
for _, item := range a.Content {
y, err := NewParameterOrReference(item, compiler.NewContext("parameters", item, context))
if err != nil {
errors = append(errors, err)
}
x.Parameters = append(x.Parameters, y)
}
}
}
// repeated NamedAny specification_extension = 14;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewPaths creates an object of type Paths if possible, returning an error if not.
func NewPaths(in *yaml.Node, context *compiler.Context) (*Paths, error) {
errors := make([]error, 0)
x := &Paths{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{}
allowedPatterns := []*regexp.Regexp{pattern2, pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated NamedPathItem path = 1;
// MAP: PathItem ^/
x.Path = make([]*NamedPathItem, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "/") {
pair := &NamedPathItem{}
pair.Name = k
var err error
pair.Value, err = NewPathItem(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.Path = append(x.Path, pair)
}
}
}
// repeated NamedAny specification_extension = 2;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewProperties creates an object of type Properties if possible, returning an error if not.
func NewProperties(in *yaml.Node, context *compiler.Context) (*Properties, error) {
errors := make([]error, 0)
x := &Properties{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSchemaOrReference additional_properties = 1;
// MAP: SchemaOrReference
x.AdditionalProperties = make([]*NamedSchemaOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSchemaOrReference{}
pair.Name = k
var err error
pair.Value, err = NewSchemaOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewReference creates an object of type Reference if possible, returning an error if not.
func NewReference(in *yaml.Node, context *compiler.Context) (*Reference, error) {
errors := make([]error, 0)
x := &Reference{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"$ref"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string _ref = 1;
v1 := compiler.MapValueForKey(m, "$ref")
if v1 != nil {
x.XRef, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for $ref: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string summary = 2;
v2 := compiler.MapValueForKey(m, "summary")
if v2 != nil {
x.Summary, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewRequestBodiesOrReferences creates an object of type RequestBodiesOrReferences if possible, returning an error if not.
func NewRequestBodiesOrReferences(in *yaml.Node, context *compiler.Context) (*RequestBodiesOrReferences, error) {
errors := make([]error, 0)
x := &RequestBodiesOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedRequestBodyOrReference additional_properties = 1;
// MAP: RequestBodyOrReference
x.AdditionalProperties = make([]*NamedRequestBodyOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedRequestBodyOrReference{}
pair.Name = k
var err error
pair.Value, err = NewRequestBodyOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewRequestBody creates an object of type RequestBody if possible, returning an error if not.
func NewRequestBody(in *yaml.Node, context *compiler.Context) (*RequestBody, error) {
errors := make([]error, 0)
x := &RequestBody{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"content"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"content", "description", "required"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// MediaTypes content = 2;
v2 := compiler.MapValueForKey(m, "content")
if v2 != nil {
var err error
x.Content, err = NewMediaTypes(v2, compiler.NewContext("content", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// bool required = 3;
v3 := compiler.MapValueForKey(m, "required")
if v3 != nil {
x.Required, ok = compiler.BoolForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 4;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewRequestBodyOrReference creates an object of type RequestBodyOrReference if possible, returning an error if not.
func NewRequestBodyOrReference(in *yaml.Node, context *compiler.Context) (*RequestBodyOrReference, error) {
errors := make([]error, 0)
x := &RequestBodyOrReference{}
matched := false
// RequestBody request_body = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewRequestBody(m, compiler.NewContext("requestBody", m, context))
if matchingError == nil {
x.Oneof = &RequestBodyOrReference_RequestBody{RequestBody: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &RequestBodyOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid RequestBodyOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponse creates an object of type Response if possible, returning an error if not.
func NewResponse(in *yaml.Node, context *compiler.Context) (*Response, error) {
errors := make([]error, 0)
x := &Response{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"description"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"content", "description", "headers", "links"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string description = 1;
v1 := compiler.MapValueForKey(m, "description")
if v1 != nil {
x.Description, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// HeadersOrReferences headers = 2;
v2 := compiler.MapValueForKey(m, "headers")
if v2 != nil {
var err error
x.Headers, err = NewHeadersOrReferences(v2, compiler.NewContext("headers", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// MediaTypes content = 3;
v3 := compiler.MapValueForKey(m, "content")
if v3 != nil {
var err error
x.Content, err = NewMediaTypes(v3, compiler.NewContext("content", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// LinksOrReferences links = 4;
v4 := compiler.MapValueForKey(m, "links")
if v4 != nil {
var err error
x.Links, err = NewLinksOrReferences(v4, compiler.NewContext("links", v4, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 5;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponseOrReference creates an object of type ResponseOrReference if possible, returning an error if not.
func NewResponseOrReference(in *yaml.Node, context *compiler.Context) (*ResponseOrReference, error) {
errors := make([]error, 0)
x := &ResponseOrReference{}
matched := false
// Response response = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewResponse(m, compiler.NewContext("response", m, context))
if matchingError == nil {
x.Oneof = &ResponseOrReference_Response{Response: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &ResponseOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid ResponseOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponses creates an object of type Responses if possible, returning an error if not.
func NewResponses(in *yaml.Node, context *compiler.Context) (*Responses, error) {
errors := make([]error, 0)
x := &Responses{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"default"}
allowedPatterns := []*regexp.Regexp{pattern3, pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// ResponseOrReference default = 1;
v1 := compiler.MapValueForKey(m, "default")
if v1 != nil {
var err error
x.Default, err = NewResponseOrReference(v1, compiler.NewContext("default", v1, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedResponseOrReference response_or_reference = 2;
// MAP: ResponseOrReference ^([0-9X]{3})$
x.ResponseOrReference = make([]*NamedResponseOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if pattern3.MatchString(k) {
pair := &NamedResponseOrReference{}
pair.Name = k
var err error
pair.Value, err = NewResponseOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.ResponseOrReference = append(x.ResponseOrReference, pair)
}
}
}
// repeated NamedAny specification_extension = 3;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewResponsesOrReferences creates an object of type ResponsesOrReferences if possible, returning an error if not.
func NewResponsesOrReferences(in *yaml.Node, context *compiler.Context) (*ResponsesOrReferences, error) {
errors := make([]error, 0)
x := &ResponsesOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedResponseOrReference additional_properties = 1;
// MAP: ResponseOrReference
x.AdditionalProperties = make([]*NamedResponseOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedResponseOrReference{}
pair.Name = k
var err error
pair.Value, err = NewResponseOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchema creates an object of type Schema if possible, returning an error if not.
func NewSchema(in *yaml.Node, context *compiler.Context) (*Schema, error) {
errors := make([]error, 0)
x := &Schema{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"additionalProperties", "allOf", "anyOf", "default", "deprecated", "description", "discriminator", "enum", "example", "exclusiveMaximum", "exclusiveMinimum", "externalDocs", "format", "items", "maxItems", "maxLength", "maxProperties", "maximum", "minItems", "minLength", "minProperties", "minimum", "multipleOf", "not", "nullable", "oneOf", "pattern", "properties", "readOnly", "required", "title", "type", "uniqueItems", "writeOnly", "xml"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// bool nullable = 1;
v1 := compiler.MapValueForKey(m, "nullable")
if v1 != nil {
x.Nullable, ok = compiler.BoolForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for nullable: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// Discriminator discriminator = 2;
v2 := compiler.MapValueForKey(m, "discriminator")
if v2 != nil {
var err error
x.Discriminator, err = NewDiscriminator(v2, compiler.NewContext("discriminator", v2, context))
if err != nil {
errors = append(errors, err)
}
}
// bool read_only = 3;
v3 := compiler.MapValueForKey(m, "readOnly")
if v3 != nil {
x.ReadOnly, ok = compiler.BoolForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for readOnly: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool write_only = 4;
v4 := compiler.MapValueForKey(m, "writeOnly")
if v4 != nil {
x.WriteOnly, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for writeOnly: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// Xml xml = 5;
v5 := compiler.MapValueForKey(m, "xml")
if v5 != nil {
var err error
x.Xml, err = NewXml(v5, compiler.NewContext("xml", v5, context))
if err != nil {
errors = append(errors, err)
}
}
// ExternalDocs external_docs = 6;
v6 := compiler.MapValueForKey(m, "externalDocs")
if v6 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v6, compiler.NewContext("externalDocs", v6, context))
if err != nil {
errors = append(errors, err)
}
}
// Any example = 7;
v7 := compiler.MapValueForKey(m, "example")
if v7 != nil {
var err error
x.Example, err = NewAny(v7, compiler.NewContext("example", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// bool deprecated = 8;
v8 := compiler.MapValueForKey(m, "deprecated")
if v8 != nil {
x.Deprecated, ok = compiler.BoolForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for deprecated: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// string title = 9;
v9 := compiler.MapValueForKey(m, "title")
if v9 != nil {
x.Title, ok = compiler.StringForScalarNode(v9)
if !ok {
message := fmt.Sprintf("has unexpected value for title: %s", compiler.Display(v9))
errors = append(errors, compiler.NewError(context, message))
}
}
// float multiple_of = 10;
v10 := compiler.MapValueForKey(m, "multipleOf")
if v10 != nil {
v, ok := compiler.FloatForScalarNode(v10)
if ok {
x.MultipleOf = v
} else {
message := fmt.Sprintf("has unexpected value for multipleOf: %s", compiler.Display(v10))
errors = append(errors, compiler.NewError(context, message))
}
}
// float maximum = 11;
v11 := compiler.MapValueForKey(m, "maximum")
if v11 != nil {
v, ok := compiler.FloatForScalarNode(v11)
if ok {
x.Maximum = v
} else {
message := fmt.Sprintf("has unexpected value for maximum: %s", compiler.Display(v11))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_maximum = 12;
v12 := compiler.MapValueForKey(m, "exclusiveMaximum")
if v12 != nil {
x.ExclusiveMaximum, ok = compiler.BoolForScalarNode(v12)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %s", compiler.Display(v12))
errors = append(errors, compiler.NewError(context, message))
}
}
// float minimum = 13;
v13 := compiler.MapValueForKey(m, "minimum")
if v13 != nil {
v, ok := compiler.FloatForScalarNode(v13)
if ok {
x.Minimum = v
} else {
message := fmt.Sprintf("has unexpected value for minimum: %s", compiler.Display(v13))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool exclusive_minimum = 14;
v14 := compiler.MapValueForKey(m, "exclusiveMinimum")
if v14 != nil {
x.ExclusiveMinimum, ok = compiler.BoolForScalarNode(v14)
if !ok {
message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %s", compiler.Display(v14))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_length = 15;
v15 := compiler.MapValueForKey(m, "maxLength")
if v15 != nil {
t, ok := compiler.IntForScalarNode(v15)
if ok {
x.MaxLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxLength: %s", compiler.Display(v15))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_length = 16;
v16 := compiler.MapValueForKey(m, "minLength")
if v16 != nil {
t, ok := compiler.IntForScalarNode(v16)
if ok {
x.MinLength = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minLength: %s", compiler.Display(v16))
errors = append(errors, compiler.NewError(context, message))
}
}
// string pattern = 17;
v17 := compiler.MapValueForKey(m, "pattern")
if v17 != nil {
x.Pattern, ok = compiler.StringForScalarNode(v17)
if !ok {
message := fmt.Sprintf("has unexpected value for pattern: %s", compiler.Display(v17))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_items = 18;
v18 := compiler.MapValueForKey(m, "maxItems")
if v18 != nil {
t, ok := compiler.IntForScalarNode(v18)
if ok {
x.MaxItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxItems: %s", compiler.Display(v18))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_items = 19;
v19 := compiler.MapValueForKey(m, "minItems")
if v19 != nil {
t, ok := compiler.IntForScalarNode(v19)
if ok {
x.MinItems = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minItems: %s", compiler.Display(v19))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool unique_items = 20;
v20 := compiler.MapValueForKey(m, "uniqueItems")
if v20 != nil {
x.UniqueItems, ok = compiler.BoolForScalarNode(v20)
if !ok {
message := fmt.Sprintf("has unexpected value for uniqueItems: %s", compiler.Display(v20))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 max_properties = 21;
v21 := compiler.MapValueForKey(m, "maxProperties")
if v21 != nil {
t, ok := compiler.IntForScalarNode(v21)
if ok {
x.MaxProperties = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for maxProperties: %s", compiler.Display(v21))
errors = append(errors, compiler.NewError(context, message))
}
}
// int64 min_properties = 22;
v22 := compiler.MapValueForKey(m, "minProperties")
if v22 != nil {
t, ok := compiler.IntForScalarNode(v22)
if ok {
x.MinProperties = int64(t)
} else {
message := fmt.Sprintf("has unexpected value for minProperties: %s", compiler.Display(v22))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated string required = 23;
v23 := compiler.MapValueForKey(m, "required")
if v23 != nil {
v, ok := compiler.SequenceNodeForNode(v23)
if ok {
x.Required = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for required: %s", compiler.Display(v23))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated Any enum = 24;
v24 := compiler.MapValueForKey(m, "enum")
if v24 != nil {
// repeated Any
x.Enum = make([]*Any, 0)
a, ok := compiler.SequenceNodeForNode(v24)
if ok {
for _, item := range a.Content {
y, err := NewAny(item, compiler.NewContext("enum", item, context))
if err != nil {
errors = append(errors, err)
}
x.Enum = append(x.Enum, y)
}
}
}
// string type = 25;
v25 := compiler.MapValueForKey(m, "type")
if v25 != nil {
x.Type, ok = compiler.StringForScalarNode(v25)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v25))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated SchemaOrReference all_of = 26;
v26 := compiler.MapValueForKey(m, "allOf")
if v26 != nil {
// repeated SchemaOrReference
x.AllOf = make([]*SchemaOrReference, 0)
a, ok := compiler.SequenceNodeForNode(v26)
if ok {
for _, item := range a.Content {
y, err := NewSchemaOrReference(item, compiler.NewContext("allOf", item, context))
if err != nil {
errors = append(errors, err)
}
x.AllOf = append(x.AllOf, y)
}
}
}
// repeated SchemaOrReference one_of = 27;
v27 := compiler.MapValueForKey(m, "oneOf")
if v27 != nil {
// repeated SchemaOrReference
x.OneOf = make([]*SchemaOrReference, 0)
a, ok := compiler.SequenceNodeForNode(v27)
if ok {
for _, item := range a.Content {
y, err := NewSchemaOrReference(item, compiler.NewContext("oneOf", item, context))
if err != nil {
errors = append(errors, err)
}
x.OneOf = append(x.OneOf, y)
}
}
}
// repeated SchemaOrReference any_of = 28;
v28 := compiler.MapValueForKey(m, "anyOf")
if v28 != nil {
// repeated SchemaOrReference
x.AnyOf = make([]*SchemaOrReference, 0)
a, ok := compiler.SequenceNodeForNode(v28)
if ok {
for _, item := range a.Content {
y, err := NewSchemaOrReference(item, compiler.NewContext("anyOf", item, context))
if err != nil {
errors = append(errors, err)
}
x.AnyOf = append(x.AnyOf, y)
}
}
}
// Schema not = 29;
v29 := compiler.MapValueForKey(m, "not")
if v29 != nil {
var err error
x.Not, err = NewSchema(v29, compiler.NewContext("not", v29, context))
if err != nil {
errors = append(errors, err)
}
}
// ItemsItem items = 30;
v30 := compiler.MapValueForKey(m, "items")
if v30 != nil {
var err error
x.Items, err = NewItemsItem(v30, compiler.NewContext("items", v30, context))
if err != nil {
errors = append(errors, err)
}
}
// Properties properties = 31;
v31 := compiler.MapValueForKey(m, "properties")
if v31 != nil {
var err error
x.Properties, err = NewProperties(v31, compiler.NewContext("properties", v31, context))
if err != nil {
errors = append(errors, err)
}
}
// AdditionalPropertiesItem additional_properties = 32;
v32 := compiler.MapValueForKey(m, "additionalProperties")
if v32 != nil {
var err error
x.AdditionalProperties, err = NewAdditionalPropertiesItem(v32, compiler.NewContext("additionalProperties", v32, context))
if err != nil {
errors = append(errors, err)
}
}
// DefaultType default = 33;
v33 := compiler.MapValueForKey(m, "default")
if v33 != nil {
var err error
x.Default, err = NewDefaultType(v33, compiler.NewContext("default", v33, context))
if err != nil {
errors = append(errors, err)
}
}
// string description = 34;
v34 := compiler.MapValueForKey(m, "description")
if v34 != nil {
x.Description, ok = compiler.StringForScalarNode(v34)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v34))
errors = append(errors, compiler.NewError(context, message))
}
}
// string format = 35;
v35 := compiler.MapValueForKey(m, "format")
if v35 != nil {
x.Format, ok = compiler.StringForScalarNode(v35)
if !ok {
message := fmt.Sprintf("has unexpected value for format: %s", compiler.Display(v35))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 36;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchemaOrReference creates an object of type SchemaOrReference if possible, returning an error if not.
func NewSchemaOrReference(in *yaml.Node, context *compiler.Context) (*SchemaOrReference, error) {
errors := make([]error, 0)
x := &SchemaOrReference{}
matched := false
// Schema schema = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewSchema(m, compiler.NewContext("schema", m, context))
if matchingError == nil {
x.Oneof = &SchemaOrReference_Schema{Schema: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &SchemaOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid SchemaOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSchemasOrReferences creates an object of type SchemasOrReferences if possible, returning an error if not.
func NewSchemasOrReferences(in *yaml.Node, context *compiler.Context) (*SchemasOrReferences, error) {
errors := make([]error, 0)
x := &SchemasOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSchemaOrReference additional_properties = 1;
// MAP: SchemaOrReference
x.AdditionalProperties = make([]*NamedSchemaOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSchemaOrReference{}
pair.Name = k
var err error
pair.Value, err = NewSchemaOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not.
func NewSecurityRequirement(in *yaml.Node, context *compiler.Context) (*SecurityRequirement, error) {
errors := make([]error, 0)
x := &SecurityRequirement{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedStringArray additional_properties = 1;
// MAP: StringArray
x.AdditionalProperties = make([]*NamedStringArray, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedStringArray{}
pair.Name = k
var err error
pair.Value, err = NewStringArray(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecurityScheme creates an object of type SecurityScheme if possible, returning an error if not.
func NewSecurityScheme(in *yaml.Node, context *compiler.Context) (*SecurityScheme, error) {
errors := make([]error, 0)
x := &SecurityScheme{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"type"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"bearerFormat", "description", "flows", "in", "name", "openIdConnectUrl", "scheme", "type"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string type = 1;
v1 := compiler.MapValueForKey(m, "type")
if v1 != nil {
x.Type, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for type: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string name = 3;
v3 := compiler.MapValueForKey(m, "name")
if v3 != nil {
x.Name, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// string in = 4;
v4 := compiler.MapValueForKey(m, "in")
if v4 != nil {
x.In, ok = compiler.StringForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for in: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// string scheme = 5;
v5 := compiler.MapValueForKey(m, "scheme")
if v5 != nil {
x.Scheme, ok = compiler.StringForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for scheme: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// string bearer_format = 6;
v6 := compiler.MapValueForKey(m, "bearerFormat")
if v6 != nil {
x.BearerFormat, ok = compiler.StringForScalarNode(v6)
if !ok {
message := fmt.Sprintf("has unexpected value for bearerFormat: %s", compiler.Display(v6))
errors = append(errors, compiler.NewError(context, message))
}
}
// OauthFlows flows = 7;
v7 := compiler.MapValueForKey(m, "flows")
if v7 != nil {
var err error
x.Flows, err = NewOauthFlows(v7, compiler.NewContext("flows", v7, context))
if err != nil {
errors = append(errors, err)
}
}
// string open_id_connect_url = 8;
v8 := compiler.MapValueForKey(m, "openIdConnectUrl")
if v8 != nil {
x.OpenIdConnectUrl, ok = compiler.StringForScalarNode(v8)
if !ok {
message := fmt.Sprintf("has unexpected value for openIdConnectUrl: %s", compiler.Display(v8))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 9;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecuritySchemeOrReference creates an object of type SecuritySchemeOrReference if possible, returning an error if not.
func NewSecuritySchemeOrReference(in *yaml.Node, context *compiler.Context) (*SecuritySchemeOrReference, error) {
errors := make([]error, 0)
x := &SecuritySchemeOrReference{}
matched := false
// SecurityScheme security_scheme = 1;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewSecurityScheme(m, compiler.NewContext("securityScheme", m, context))
if matchingError == nil {
x.Oneof = &SecuritySchemeOrReference_SecurityScheme{SecurityScheme: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
// Reference reference = 2;
{
m, ok := compiler.UnpackMap(in)
if ok {
// errors might be ok here, they mean we just don't have the right subtype
t, matchingError := NewReference(m, compiler.NewContext("reference", m, context))
if matchingError == nil {
x.Oneof = &SecuritySchemeOrReference_Reference{Reference: t}
matched = true
} else {
errors = append(errors, matchingError)
}
}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
} else {
message := fmt.Sprintf("contains an invalid SecuritySchemeOrReference")
err := compiler.NewError(context, message)
errors = []error{err}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSecuritySchemesOrReferences creates an object of type SecuritySchemesOrReferences if possible, returning an error if not.
func NewSecuritySchemesOrReferences(in *yaml.Node, context *compiler.Context) (*SecuritySchemesOrReferences, error) {
errors := make([]error, 0)
x := &SecuritySchemesOrReferences{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedSecuritySchemeOrReference additional_properties = 1;
// MAP: SecuritySchemeOrReference
x.AdditionalProperties = make([]*NamedSecuritySchemeOrReference, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedSecuritySchemeOrReference{}
pair.Name = k
var err error
pair.Value, err = NewSecuritySchemeOrReference(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewServer creates an object of type Server if possible, returning an error if not.
func NewServer(in *yaml.Node, context *compiler.Context) (*Server, error) {
errors := make([]error, 0)
x := &Server{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"url"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "url", "variables"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string url = 1;
v1 := compiler.MapValueForKey(m, "url")
if v1 != nil {
x.Url, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for url: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// ServerVariables variables = 3;
v3 := compiler.MapValueForKey(m, "variables")
if v3 != nil {
var err error
x.Variables, err = NewServerVariables(v3, compiler.NewContext("variables", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 4;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewServerVariable creates an object of type ServerVariable if possible, returning an error if not.
func NewServerVariable(in *yaml.Node, context *compiler.Context) (*ServerVariable, error) {
errors := make([]error, 0)
x := &ServerVariable{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"default"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"default", "description", "enum"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// repeated string enum = 1;
v1 := compiler.MapValueForKey(m, "enum")
if v1 != nil {
v, ok := compiler.SequenceNodeForNode(v1)
if ok {
x.Enum = compiler.StringArrayForSequenceNode(v)
} else {
message := fmt.Sprintf("has unexpected value for enum: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string default = 2;
v2 := compiler.MapValueForKey(m, "default")
if v2 != nil {
x.Default, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for default: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 3;
v3 := compiler.MapValueForKey(m, "description")
if v3 != nil {
x.Description, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 4;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewServerVariables creates an object of type ServerVariables if possible, returning an error if not.
func NewServerVariables(in *yaml.Node, context *compiler.Context) (*ServerVariables, error) {
errors := make([]error, 0)
x := &ServerVariables{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedServerVariable additional_properties = 1;
// MAP: ServerVariable
x.AdditionalProperties = make([]*NamedServerVariable, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedServerVariable{}
pair.Name = k
var err error
pair.Value, err = NewServerVariable(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewSpecificationExtension creates an object of type SpecificationExtension if possible, returning an error if not.
func NewSpecificationExtension(in *yaml.Node, context *compiler.Context) (*SpecificationExtension, error) {
errors := make([]error, 0)
x := &SpecificationExtension{}
matched := false
switch in.Tag {
case "!!bool":
var v bool
v, matched = compiler.BoolForScalarNode(in)
x.Oneof = &SpecificationExtension_Boolean{Boolean: v}
case "!!str":
var v string
v, matched = compiler.StringForScalarNode(in)
x.Oneof = &SpecificationExtension_String_{String_: v}
case "!!float":
var v float64
v, matched = compiler.FloatForScalarNode(in)
x.Oneof = &SpecificationExtension_Number{Number: v}
case "!!int":
var v int64
v, matched = compiler.IntForScalarNode(in)
x.Oneof = &SpecificationExtension_Number{Number: float64(v)}
}
if matched {
// since the oneof matched one of its possibilities, discard any matching errors
errors = make([]error, 0)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewStringArray creates an object of type StringArray if possible, returning an error if not.
func NewStringArray(in *yaml.Node, context *compiler.Context) (*StringArray, error) {
errors := make([]error, 0)
x := &StringArray{}
x.Value = make([]string, 0)
for _, node := range in.Content {
s, _ := compiler.StringForScalarNode(node)
x.Value = append(x.Value, s)
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewStrings creates an object of type Strings if possible, returning an error if not.
func NewStrings(in *yaml.Node, context *compiler.Context) (*Strings, error) {
errors := make([]error, 0)
x := &Strings{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
// repeated NamedString additional_properties = 1;
// MAP: string
x.AdditionalProperties = make([]*NamedString, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
pair := &NamedString{}
pair.Name = k
pair.Value, _ = compiler.StringForScalarNode(v)
x.AdditionalProperties = append(x.AdditionalProperties, pair)
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewTag creates an object of type Tag if possible, returning an error if not.
func NewTag(in *yaml.Node, context *compiler.Context) (*Tag, error) {
errors := make([]error, 0)
x := &Tag{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
requiredKeys := []string{"name"}
missingKeys := compiler.MissingKeysInMap(m, requiredKeys)
if len(missingKeys) > 0 {
message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
allowedKeys := []string{"description", "externalDocs", "name"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string description = 2;
v2 := compiler.MapValueForKey(m, "description")
if v2 != nil {
x.Description, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// ExternalDocs external_docs = 3;
v3 := compiler.MapValueForKey(m, "externalDocs")
if v3 != nil {
var err error
x.ExternalDocs, err = NewExternalDocs(v3, compiler.NewContext("externalDocs", v3, context))
if err != nil {
errors = append(errors, err)
}
}
// repeated NamedAny specification_extension = 4;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// NewXml creates an object of type Xml if possible, returning an error if not.
func NewXml(in *yaml.Node, context *compiler.Context) (*Xml, error) {
errors := make([]error, 0)
x := &Xml{}
m, ok := compiler.UnpackMap(in)
if !ok {
message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
errors = append(errors, compiler.NewError(context, message))
} else {
allowedKeys := []string{"attribute", "name", "namespace", "prefix", "wrapped"}
allowedPatterns := []*regexp.Regexp{pattern1}
invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)
if len(invalidKeys) > 0 {
message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", "))
errors = append(errors, compiler.NewError(context, message))
}
// string name = 1;
v1 := compiler.MapValueForKey(m, "name")
if v1 != nil {
x.Name, ok = compiler.StringForScalarNode(v1)
if !ok {
message := fmt.Sprintf("has unexpected value for name: %s", compiler.Display(v1))
errors = append(errors, compiler.NewError(context, message))
}
}
// string namespace = 2;
v2 := compiler.MapValueForKey(m, "namespace")
if v2 != nil {
x.Namespace, ok = compiler.StringForScalarNode(v2)
if !ok {
message := fmt.Sprintf("has unexpected value for namespace: %s", compiler.Display(v2))
errors = append(errors, compiler.NewError(context, message))
}
}
// string prefix = 3;
v3 := compiler.MapValueForKey(m, "prefix")
if v3 != nil {
x.Prefix, ok = compiler.StringForScalarNode(v3)
if !ok {
message := fmt.Sprintf("has unexpected value for prefix: %s", compiler.Display(v3))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool attribute = 4;
v4 := compiler.MapValueForKey(m, "attribute")
if v4 != nil {
x.Attribute, ok = compiler.BoolForScalarNode(v4)
if !ok {
message := fmt.Sprintf("has unexpected value for attribute: %s", compiler.Display(v4))
errors = append(errors, compiler.NewError(context, message))
}
}
// bool wrapped = 5;
v5 := compiler.MapValueForKey(m, "wrapped")
if v5 != nil {
x.Wrapped, ok = compiler.BoolForScalarNode(v5)
if !ok {
message := fmt.Sprintf("has unexpected value for wrapped: %s", compiler.Display(v5))
errors = append(errors, compiler.NewError(context, message))
}
}
// repeated NamedAny specification_extension = 6;
// MAP: Any ^x-
x.SpecificationExtension = make([]*NamedAny, 0)
for i := 0; i < len(m.Content); i += 2 {
k, ok := compiler.StringForScalarNode(m.Content[i])
if ok {
v := m.Content[i+1]
if strings.HasPrefix(k, "x-") {
pair := &NamedAny{}
pair.Name = k
result := &Any{}
handled, resultFromExt, err := compiler.CallExtension(context, v, k)
if handled {
if err != nil {
errors = append(errors, err)
} else {
bytes := compiler.Marshal(v)
result.Yaml = string(bytes)
result.Value = resultFromExt
pair.Value = result
}
} else {
pair.Value, err = NewAny(v, compiler.NewContext(k, v, context))
if err != nil {
errors = append(errors, err)
}
}
x.SpecificationExtension = append(x.SpecificationExtension, pair)
}
}
}
}
return x, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside AdditionalPropertiesItem objects.
func (m *AdditionalPropertiesItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*AdditionalPropertiesItem_SchemaOrReference)
if ok {
_, err := p.SchemaOrReference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Any objects.
func (m *Any) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside AnyOrExpression objects.
func (m *AnyOrExpression) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*AnyOrExpression_Any)
if ok {
_, err := p.Any.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*AnyOrExpression_Expression)
if ok {
_, err := p.Expression.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Callback objects.
func (m *Callback) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.Path {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside CallbackOrReference objects.
func (m *CallbackOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*CallbackOrReference_Callback)
if ok {
_, err := p.Callback.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*CallbackOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside CallbacksOrReferences objects.
func (m *CallbacksOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Components objects.
func (m *Components) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schemas != nil {
_, err := m.Schemas.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Responses != nil {
_, err := m.Responses.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Parameters != nil {
_, err := m.Parameters.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Examples != nil {
_, err := m.Examples.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.RequestBodies != nil {
_, err := m.RequestBodies.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Headers != nil {
_, err := m.Headers.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.SecuritySchemes != nil {
_, err := m.SecuritySchemes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Links != nil {
_, err := m.Links.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Callbacks != nil {
_, err := m.Callbacks.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Contact objects.
func (m *Contact) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside DefaultType objects.
func (m *DefaultType) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Discriminator objects.
func (m *Discriminator) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Mapping != nil {
_, err := m.Mapping.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Document objects.
func (m *Document) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Info != nil {
_, err := m.Info.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Servers {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.Paths != nil {
_, err := m.Paths.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Components != nil {
_, err := m.Components.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Security {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.Tags {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Encoding objects.
func (m *Encoding) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Headers != nil {
_, err := m.Headers.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Encodings objects.
func (m *Encodings) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Example objects.
func (m *Example) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ExampleOrReference objects.
func (m *ExampleOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*ExampleOrReference_Example)
if ok {
_, err := p.Example.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*ExampleOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ExamplesOrReferences objects.
func (m *ExamplesOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Expression objects.
func (m *Expression) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ExternalDocs objects.
func (m *ExternalDocs) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Header objects.
func (m *Header) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schema != nil {
_, err := m.Schema.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Examples != nil {
_, err := m.Examples.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Content != nil {
_, err := m.Content.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside HeaderOrReference objects.
func (m *HeaderOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*HeaderOrReference_Header)
if ok {
_, err := p.Header.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*HeaderOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside HeadersOrReferences objects.
func (m *HeadersOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Info objects.
func (m *Info) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Contact != nil {
_, err := m.Contact.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.License != nil {
_, err := m.License.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ItemsItem objects.
func (m *ItemsItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SchemaOrReference {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside License objects.
func (m *License) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Link objects.
func (m *Link) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Parameters != nil {
_, err := m.Parameters.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.RequestBody != nil {
_, err := m.RequestBody.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Server != nil {
_, err := m.Server.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside LinkOrReference objects.
func (m *LinkOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*LinkOrReference_Link)
if ok {
_, err := p.Link.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*LinkOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside LinksOrReferences objects.
func (m *LinksOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside MediaType objects.
func (m *MediaType) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schema != nil {
_, err := m.Schema.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Examples != nil {
_, err := m.Examples.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Encoding != nil {
_, err := m.Encoding.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside MediaTypes objects.
func (m *MediaTypes) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedAny objects.
func (m *NamedAny) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedCallbackOrReference objects.
func (m *NamedCallbackOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedEncoding objects.
func (m *NamedEncoding) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedExampleOrReference objects.
func (m *NamedExampleOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedHeaderOrReference objects.
func (m *NamedHeaderOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedLinkOrReference objects.
func (m *NamedLinkOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedMediaType objects.
func (m *NamedMediaType) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedParameterOrReference objects.
func (m *NamedParameterOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedPathItem objects.
func (m *NamedPathItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedRequestBodyOrReference objects.
func (m *NamedRequestBodyOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedResponseOrReference objects.
func (m *NamedResponseOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedSchemaOrReference objects.
func (m *NamedSchemaOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedSecuritySchemeOrReference objects.
func (m *NamedSecuritySchemeOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedServerVariable objects.
func (m *NamedServerVariable) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedString objects.
func (m *NamedString) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside NamedStringArray objects.
func (m *NamedStringArray) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Value != nil {
_, err := m.Value.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside OauthFlow objects.
func (m *OauthFlow) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Scopes != nil {
_, err := m.Scopes.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside OauthFlows objects.
func (m *OauthFlows) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Implicit != nil {
_, err := m.Implicit.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Password != nil {
_, err := m.Password.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.ClientCredentials != nil {
_, err := m.ClientCredentials.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.AuthorizationCode != nil {
_, err := m.AuthorizationCode.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Object objects.
func (m *Object) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Operation objects.
func (m *Operation) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Parameters {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.RequestBody != nil {
_, err := m.RequestBody.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Responses != nil {
_, err := m.Responses.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Callbacks != nil {
_, err := m.Callbacks.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Security {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.Servers {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Parameter objects.
func (m *Parameter) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Schema != nil {
_, err := m.Schema.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Examples != nil {
_, err := m.Examples.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Content != nil {
_, err := m.Content.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ParameterOrReference objects.
func (m *ParameterOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*ParameterOrReference_Parameter)
if ok {
_, err := p.Parameter.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*ParameterOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ParametersOrReferences objects.
func (m *ParametersOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside PathItem objects.
func (m *PathItem) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewPathItem(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
if m.Get != nil {
_, err := m.Get.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Put != nil {
_, err := m.Put.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Post != nil {
_, err := m.Post.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Delete != nil {
_, err := m.Delete.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Options != nil {
_, err := m.Options.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Head != nil {
_, err := m.Head.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Patch != nil {
_, err := m.Patch.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Trace != nil {
_, err := m.Trace.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Servers {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.Parameters {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Paths objects.
func (m *Paths) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.Path {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Properties objects.
func (m *Properties) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Reference objects.
func (m *Reference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.XRef != "" {
info, err := compiler.ReadInfoForRef(root, m.XRef)
if err != nil {
return nil, err
}
if info != nil {
replacement, err := NewReference(info, nil)
if err == nil {
*m = *replacement
return m.ResolveReferences(root)
}
}
return info, nil
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside RequestBodiesOrReferences objects.
func (m *RequestBodiesOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside RequestBody objects.
func (m *RequestBody) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Content != nil {
_, err := m.Content.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside RequestBodyOrReference objects.
func (m *RequestBodyOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*RequestBodyOrReference_RequestBody)
if ok {
_, err := p.RequestBody.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*RequestBodyOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Response objects.
func (m *Response) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Headers != nil {
_, err := m.Headers.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Content != nil {
_, err := m.Content.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Links != nil {
_, err := m.Links.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ResponseOrReference objects.
func (m *ResponseOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*ResponseOrReference_Response)
if ok {
_, err := p.Response.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*ResponseOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Responses objects.
func (m *Responses) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.ResponseOrReference {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ResponsesOrReferences objects.
func (m *ResponsesOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Schema objects.
func (m *Schema) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Discriminator != nil {
_, err := m.Discriminator.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Xml != nil {
_, err := m.Xml.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Example != nil {
_, err := m.Example.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.Enum {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.AllOf {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.OneOf {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
for _, item := range m.AnyOf {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
if m.Not != nil {
_, err := m.Not.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Items != nil {
_, err := m.Items.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Properties != nil {
_, err := m.Properties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.AdditionalProperties != nil {
_, err := m.AdditionalProperties.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
if m.Default != nil {
_, err := m.Default.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SchemaOrReference objects.
func (m *SchemaOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*SchemaOrReference_Schema)
if ok {
_, err := p.Schema.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SchemaOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SchemasOrReferences objects.
func (m *SchemasOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecurityRequirement objects.
func (m *SecurityRequirement) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecurityScheme objects.
func (m *SecurityScheme) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Flows != nil {
_, err := m.Flows.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecuritySchemeOrReference objects.
func (m *SecuritySchemeOrReference) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
{
p, ok := m.Oneof.(*SecuritySchemeOrReference_SecurityScheme)
if ok {
_, err := p.SecurityScheme.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
{
p, ok := m.Oneof.(*SecuritySchemeOrReference_Reference)
if ok {
_, err := p.Reference.ResolveReferences(root)
if err != nil {
return nil, err
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SecuritySchemesOrReferences objects.
func (m *SecuritySchemesOrReferences) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Server objects.
func (m *Server) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.Variables != nil {
_, err := m.Variables.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ServerVariable objects.
func (m *ServerVariable) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside ServerVariables objects.
func (m *ServerVariables) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside SpecificationExtension objects.
func (m *SpecificationExtension) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside StringArray objects.
func (m *StringArray) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Strings objects.
func (m *Strings) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.AdditionalProperties {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Tag objects.
func (m *Tag) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
if m.ExternalDocs != nil {
_, err := m.ExternalDocs.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ResolveReferences resolves references found inside Xml objects.
func (m *Xml) ResolveReferences(root string) (*yaml.Node, error) {
errors := make([]error, 0)
for _, item := range m.SpecificationExtension {
if item != nil {
_, err := item.ResolveReferences(root)
if err != nil {
errors = append(errors, err)
}
}
}
return nil, compiler.NewErrorGroupOrNil(errors)
}
// ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export.
func (m *AdditionalPropertiesItem) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// AdditionalPropertiesItem
// {Name:schemaOrReference Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetSchemaOrReference()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
return compiler.NewScalarNodeForBool(v1.Boolean)
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Any suitable for JSON or YAML export.
func (m *Any) ToRawInfo() *yaml.Node {
var err error
var node yaml.Node
err = yaml.Unmarshal([]byte(m.Yaml), &node)
if err == nil {
if node.Kind == yaml.DocumentNode {
return node.Content[0]
}
return &node
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of AnyOrExpression suitable for JSON or YAML export.
func (m *AnyOrExpression) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// AnyOrExpression
// {Name:any Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetAny()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:expression Type:Expression StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetExpression()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Callback suitable for JSON or YAML export.
func (m *Callback) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Path != nil {
for _, item := range m.Path {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of CallbackOrReference suitable for JSON or YAML export.
func (m *CallbackOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// CallbackOrReference
// {Name:callback Type:Callback StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetCallback()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of CallbacksOrReferences suitable for JSON or YAML export.
func (m *CallbacksOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Components suitable for JSON or YAML export.
func (m *Components) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Schemas != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schemas"))
info.Content = append(info.Content, m.Schemas.ToRawInfo())
}
if m.Responses != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("responses"))
info.Content = append(info.Content, m.Responses.ToRawInfo())
}
if m.Parameters != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, m.Parameters.ToRawInfo())
}
if m.Examples != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("examples"))
info.Content = append(info.Content, m.Examples.ToRawInfo())
}
if m.RequestBodies != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("requestBodies"))
info.Content = append(info.Content, m.RequestBodies.ToRawInfo())
}
if m.Headers != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("headers"))
info.Content = append(info.Content, m.Headers.ToRawInfo())
}
if m.SecuritySchemes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("securitySchemes"))
info.Content = append(info.Content, m.SecuritySchemes.ToRawInfo())
}
if m.Links != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("links"))
info.Content = append(info.Content, m.Links.ToRawInfo())
}
if m.Callbacks != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("callbacks"))
info.Content = append(info.Content, m.Callbacks.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Contact suitable for JSON or YAML export.
func (m *Contact) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Url != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
}
if m.Email != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("email"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Email))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of DefaultType suitable for JSON or YAML export.
func (m *DefaultType) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// DefaultType
// {Name:number Type:float StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v0, ok := m.GetOneof().(*DefaultType_Number); ok {
return compiler.NewScalarNodeForFloat(v0.Number)
}
// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v1, ok := m.GetOneof().(*DefaultType_Boolean); ok {
return compiler.NewScalarNodeForBool(v1.Boolean)
}
// {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v2, ok := m.GetOneof().(*DefaultType_String_); ok {
return compiler.NewScalarNodeForString(v2.String_)
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Discriminator suitable for JSON or YAML export.
func (m *Discriminator) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("propertyName"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.PropertyName))
if m.Mapping != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("mapping"))
info.Content = append(info.Content, m.Mapping.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Document suitable for JSON or YAML export.
func (m *Document) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("openapi"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Openapi))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("info"))
info.Content = append(info.Content, m.Info.ToRawInfo())
if len(m.Servers) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Servers {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("servers"))
info.Content = append(info.Content, items)
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("paths"))
info.Content = append(info.Content, m.Paths.ToRawInfo())
if m.Components != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("components"))
info.Content = append(info.Content, m.Components.ToRawInfo())
}
if len(m.Security) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Security {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("security"))
info.Content = append(info.Content, items)
}
if len(m.Tags) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Tags {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("tags"))
info.Content = append(info.Content, items)
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Encoding suitable for JSON or YAML export.
func (m *Encoding) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.ContentType != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("contentType"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.ContentType))
}
if m.Headers != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("headers"))
info.Content = append(info.Content, m.Headers.ToRawInfo())
}
if m.Style != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("style"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Style))
}
if m.Explode != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("explode"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Explode))
}
if m.AllowReserved != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowReserved"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowReserved))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Encodings suitable for JSON or YAML export.
func (m *Encodings) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Example suitable for JSON or YAML export.
func (m *Example) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Value != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, m.Value.ToRawInfo())
}
if m.ExternalValue != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalValue"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.ExternalValue))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ExampleOrReference suitable for JSON or YAML export.
func (m *ExampleOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// ExampleOrReference
// {Name:example Type:Example StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetExample()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of ExamplesOrReferences suitable for JSON or YAML export.
func (m *ExamplesOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Expression suitable for JSON or YAML export.
func (m *Expression) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export.
func (m *ExternalDocs) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Header suitable for JSON or YAML export.
func (m *Header) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.Deprecated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated))
}
if m.AllowEmptyValue != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue))
}
if m.Style != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("style"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Style))
}
if m.Explode != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("explode"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Explode))
}
if m.AllowReserved != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowReserved"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowReserved))
}
if m.Schema != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, m.Schema.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.Examples != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("examples"))
info.Content = append(info.Content, m.Examples.ToRawInfo())
}
if m.Content != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("content"))
info.Content = append(info.Content, m.Content.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of HeaderOrReference suitable for JSON or YAML export.
func (m *HeaderOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// HeaderOrReference
// {Name:header Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetHeader()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of HeadersOrReferences suitable for JSON or YAML export.
func (m *HeadersOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Info suitable for JSON or YAML export.
func (m *Info) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.TermsOfService != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("termsOfService"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TermsOfService))
}
if m.Contact != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("contact"))
info.Content = append(info.Content, m.Contact.ToRawInfo())
}
if m.License != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("license"))
info.Content = append(info.Content, m.License.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("version"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Version))
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export.
func (m *ItemsItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.SchemaOrReference) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.SchemaOrReference {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("schemaOrReference"))
info.Content = append(info.Content, items)
}
return info
}
// ToRawInfo returns a description of License suitable for JSON or YAML export.
func (m *License) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
if m.Url != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Link suitable for JSON or YAML export.
func (m *Link) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.OperationRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("operationRef"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OperationRef))
}
if m.OperationId != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("operationId"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OperationId))
}
if m.Parameters != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, m.Parameters.ToRawInfo())
}
if m.RequestBody != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("requestBody"))
info.Content = append(info.Content, m.RequestBody.ToRawInfo())
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Server != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("server"))
info.Content = append(info.Content, m.Server.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of LinkOrReference suitable for JSON or YAML export.
func (m *LinkOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// LinkOrReference
// {Name:link Type:Link StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetLink()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of LinksOrReferences suitable for JSON or YAML export.
func (m *LinksOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of MediaType suitable for JSON or YAML export.
func (m *MediaType) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Schema != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, m.Schema.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.Examples != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("examples"))
info.Content = append(info.Content, m.Examples.ToRawInfo())
}
if m.Encoding != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("encoding"))
info.Content = append(info.Content, m.Encoding.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of MediaTypes suitable for JSON or YAML export.
func (m *MediaTypes) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of NamedAny suitable for JSON or YAML export.
func (m *NamedAny) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Value != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, m.Value.ToRawInfo())
}
return info
}
// ToRawInfo returns a description of NamedCallbackOrReference suitable for JSON or YAML export.
func (m *NamedCallbackOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:CallbackOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedEncoding suitable for JSON or YAML export.
func (m *NamedEncoding) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:Encoding StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedExampleOrReference suitable for JSON or YAML export.
func (m *NamedExampleOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:ExampleOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedHeaderOrReference suitable for JSON or YAML export.
func (m *NamedHeaderOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:HeaderOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedLinkOrReference suitable for JSON or YAML export.
func (m *NamedLinkOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:LinkOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedMediaType suitable for JSON or YAML export.
func (m *NamedMediaType) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:MediaType StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedParameterOrReference suitable for JSON or YAML export.
func (m *NamedParameterOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:ParameterOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export.
func (m *NamedPathItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedRequestBodyOrReference suitable for JSON or YAML export.
func (m *NamedRequestBodyOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:RequestBodyOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedResponseOrReference suitable for JSON or YAML export.
func (m *NamedResponseOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:ResponseOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedSchemaOrReference suitable for JSON or YAML export.
func (m *NamedSchemaOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedSecuritySchemeOrReference suitable for JSON or YAML export.
func (m *NamedSecuritySchemeOrReference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:SecuritySchemeOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedServerVariable suitable for JSON or YAML export.
func (m *NamedServerVariable) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:ServerVariable StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of NamedString suitable for JSON or YAML export.
func (m *NamedString) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Value != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("value"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Value))
}
return info
}
// ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export.
func (m *NamedStringArray) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
// &{Name:value Type:StringArray StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
return info
}
// ToRawInfo returns a description of OauthFlow suitable for JSON or YAML export.
func (m *OauthFlow) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AuthorizationUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.AuthorizationUrl))
}
if m.TokenUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("tokenUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.TokenUrl))
}
if m.RefreshUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("refreshUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.RefreshUrl))
}
if m.Scopes != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scopes"))
info.Content = append(info.Content, m.Scopes.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of OauthFlows suitable for JSON or YAML export.
func (m *OauthFlows) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Implicit != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("implicit"))
info.Content = append(info.Content, m.Implicit.ToRawInfo())
}
if m.Password != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("password"))
info.Content = append(info.Content, m.Password.ToRawInfo())
}
if m.ClientCredentials != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("clientCredentials"))
info.Content = append(info.Content, m.ClientCredentials.ToRawInfo())
}
if m.AuthorizationCode != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("authorizationCode"))
info.Content = append(info.Content, m.AuthorizationCode.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Object suitable for JSON or YAML export.
func (m *Object) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Operation suitable for JSON or YAML export.
func (m *Operation) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Tags) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("tags"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Tags))
}
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.OperationId != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("operationId"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OperationId))
}
if len(m.Parameters) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Parameters {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, items)
}
if m.RequestBody != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("requestBody"))
info.Content = append(info.Content, m.RequestBody.ToRawInfo())
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("responses"))
info.Content = append(info.Content, m.Responses.ToRawInfo())
if m.Callbacks != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("callbacks"))
info.Content = append(info.Content, m.Callbacks.ToRawInfo())
}
if m.Deprecated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated))
}
if len(m.Security) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Security {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("security"))
info.Content = append(info.Content, items)
}
if len(m.Servers) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Servers {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("servers"))
info.Content = append(info.Content, items)
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Parameter suitable for JSON or YAML export.
func (m *Parameter) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.Deprecated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated))
}
if m.AllowEmptyValue != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowEmptyValue"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowEmptyValue))
}
if m.Style != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("style"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Style))
}
if m.Explode != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("explode"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Explode))
}
if m.AllowReserved != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("allowReserved"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.AllowReserved))
}
if m.Schema != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("schema"))
info.Content = append(info.Content, m.Schema.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.Examples != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("examples"))
info.Content = append(info.Content, m.Examples.ToRawInfo())
}
if m.Content != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("content"))
info.Content = append(info.Content, m.Content.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ParameterOrReference suitable for JSON or YAML export.
func (m *ParameterOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// ParameterOrReference
// {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetParameter()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of ParametersOrReferences suitable for JSON or YAML export.
func (m *ParametersOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of PathItem suitable for JSON or YAML export.
func (m *PathItem) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.XRef != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
}
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Get != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("get"))
info.Content = append(info.Content, m.Get.ToRawInfo())
}
if m.Put != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("put"))
info.Content = append(info.Content, m.Put.ToRawInfo())
}
if m.Post != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("post"))
info.Content = append(info.Content, m.Post.ToRawInfo())
}
if m.Delete != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("delete"))
info.Content = append(info.Content, m.Delete.ToRawInfo())
}
if m.Options != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("options"))
info.Content = append(info.Content, m.Options.ToRawInfo())
}
if m.Head != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("head"))
info.Content = append(info.Content, m.Head.ToRawInfo())
}
if m.Patch != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("patch"))
info.Content = append(info.Content, m.Patch.ToRawInfo())
}
if m.Trace != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("trace"))
info.Content = append(info.Content, m.Trace.ToRawInfo())
}
if len(m.Servers) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Servers {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("servers"))
info.Content = append(info.Content, items)
}
if len(m.Parameters) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Parameters {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("parameters"))
info.Content = append(info.Content, items)
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Paths suitable for JSON or YAML export.
func (m *Paths) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Path != nil {
for _, item := range m.Path {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Properties suitable for JSON or YAML export.
func (m *Properties) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Reference suitable for JSON or YAML export.
func (m *Reference) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef))
if m.Summary != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("summary"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary))
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
return info
}
// ToRawInfo returns a description of RequestBodiesOrReferences suitable for JSON or YAML export.
func (m *RequestBodiesOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of RequestBody suitable for JSON or YAML export.
func (m *RequestBody) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("content"))
info.Content = append(info.Content, m.Content.ToRawInfo())
if m.Required != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Required))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of RequestBodyOrReference suitable for JSON or YAML export.
func (m *RequestBodyOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// RequestBodyOrReference
// {Name:requestBody Type:RequestBody StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetRequestBody()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Response suitable for JSON or YAML export.
func (m *Response) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
if m.Headers != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("headers"))
info.Content = append(info.Content, m.Headers.ToRawInfo())
}
if m.Content != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("content"))
info.Content = append(info.Content, m.Content.ToRawInfo())
}
if m.Links != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("links"))
info.Content = append(info.Content, m.Links.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ResponseOrReference suitable for JSON or YAML export.
func (m *ResponseOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// ResponseOrReference
// {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetResponse()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of Responses suitable for JSON or YAML export.
func (m *Responses) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.ResponseOrReference != nil {
for _, item := range m.ResponseOrReference {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ResponsesOrReferences suitable for JSON or YAML export.
func (m *ResponsesOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Schema suitable for JSON or YAML export.
func (m *Schema) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Nullable != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("nullable"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Nullable))
}
if m.Discriminator != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("discriminator"))
info.Content = append(info.Content, m.Discriminator.ToRawInfo())
}
if m.ReadOnly != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("readOnly"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ReadOnly))
}
if m.WriteOnly != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("writeOnly"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.WriteOnly))
}
if m.Xml != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("xml"))
info.Content = append(info.Content, m.Xml.ToRawInfo())
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.Example != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("example"))
info.Content = append(info.Content, m.Example.ToRawInfo())
}
if m.Deprecated != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("deprecated"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Deprecated))
}
if m.Title != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("title"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Title))
}
if m.MultipleOf != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("multipleOf"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.MultipleOf))
}
if m.Maximum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Maximum))
}
if m.ExclusiveMaximum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMaximum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMaximum))
}
if m.Minimum != 0.0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForFloat(m.Minimum))
}
if m.ExclusiveMinimum != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("exclusiveMinimum"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.ExclusiveMinimum))
}
if m.MaxLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxLength))
}
if m.MinLength != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minLength"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinLength))
}
if m.Pattern != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("pattern"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Pattern))
}
if m.MaxItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxItems))
}
if m.MinItems != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinItems))
}
if m.UniqueItems != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("uniqueItems"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.UniqueItems))
}
if m.MaxProperties != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("maxProperties"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MaxProperties))
}
if m.MinProperties != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("minProperties"))
info.Content = append(info.Content, compiler.NewScalarNodeForInt(m.MinProperties))
}
if len(m.Required) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("required"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Required))
}
if len(m.Enum) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.Enum {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, items)
}
if m.Type != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
}
if len(m.AllOf) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.AllOf {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("allOf"))
info.Content = append(info.Content, items)
}
if len(m.OneOf) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.OneOf {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("oneOf"))
info.Content = append(info.Content, items)
}
if len(m.AnyOf) != 0 {
items := compiler.NewSequenceNode()
for _, item := range m.AnyOf {
items.Content = append(items.Content, item.ToRawInfo())
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("anyOf"))
info.Content = append(info.Content, items)
}
if m.Not != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("not"))
info.Content = append(info.Content, m.Not.ToRawInfo())
}
if m.Items != nil {
items := compiler.NewSequenceNode()
for _, item := range m.Items.SchemaOrReference {
items.Content = append(items.Content, item.ToRawInfo())
}
if len(items.Content) == 1 {
items = items.Content[0]
}
info.Content = append(info.Content, compiler.NewScalarNodeForString("items"))
info.Content = append(info.Content, items)
}
if m.Properties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("properties"))
info.Content = append(info.Content, m.Properties.ToRawInfo())
}
if m.AdditionalProperties != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("additionalProperties"))
info.Content = append(info.Content, m.AdditionalProperties.ToRawInfo())
}
if m.Default != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, m.Default.ToRawInfo())
}
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Format != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("format"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Format))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SchemaOrReference suitable for JSON or YAML export.
func (m *SchemaOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// SchemaOrReference
// {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetSchema()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of SchemasOrReferences suitable for JSON or YAML export.
func (m *SchemasOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export.
func (m *SecurityRequirement) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SecurityScheme suitable for JSON or YAML export.
func (m *SecurityScheme) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("type"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Type))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.In != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("in"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.In))
}
if m.Scheme != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("scheme"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Scheme))
}
if m.BearerFormat != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("bearerFormat"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.BearerFormat))
}
if m.Flows != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("flows"))
info.Content = append(info.Content, m.Flows.ToRawInfo())
}
if m.OpenIdConnectUrl != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("openIdConnectUrl"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.OpenIdConnectUrl))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SecuritySchemeOrReference suitable for JSON or YAML export.
func (m *SecuritySchemeOrReference) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// SecuritySchemeOrReference
// {Name:securityScheme Type:SecurityScheme StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v0 := m.GetSecurityScheme()
if v0 != nil {
return v0.ToRawInfo()
}
// {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
v1 := m.GetReference()
if v1 != nil {
return v1.ToRawInfo()
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of SecuritySchemesOrReferences suitable for JSON or YAML export.
func (m *SecuritySchemesOrReferences) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Server suitable for JSON or YAML export.
func (m *Server) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("url"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Url))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.Variables != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("variables"))
info.Content = append(info.Content, m.Variables.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ServerVariable suitable for JSON or YAML export.
func (m *ServerVariable) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if len(m.Enum) != 0 {
info.Content = append(info.Content, compiler.NewScalarNodeForString("enum"))
info.Content = append(info.Content, compiler.NewSequenceNodeForStringArray(m.Enum))
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("default"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Default))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of ServerVariables suitable for JSON or YAML export.
func (m *ServerVariables) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.AdditionalProperties != nil {
for _, item := range m.AdditionalProperties {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of SpecificationExtension suitable for JSON or YAML export.
func (m *SpecificationExtension) ToRawInfo() *yaml.Node {
// ONE OF WRAPPER
// SpecificationExtension
// {Name:number Type:float StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v0, ok := m.GetOneof().(*SpecificationExtension_Number); ok {
return compiler.NewScalarNodeForFloat(v0.Number)
}
// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v1, ok := m.GetOneof().(*SpecificationExtension_Boolean); ok {
return compiler.NewScalarNodeForBool(v1.Boolean)
}
// {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
if v2, ok := m.GetOneof().(*SpecificationExtension_String_); ok {
return compiler.NewScalarNodeForString(v2.String_)
}
return compiler.NewNullNode()
}
// ToRawInfo returns a description of StringArray suitable for JSON or YAML export.
func (m *StringArray) ToRawInfo() *yaml.Node {
return compiler.NewSequenceNodeForStringArray(m.Value)
}
// ToRawInfo returns a description of Strings suitable for JSON or YAML export.
func (m *Strings) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:}
return info
}
// ToRawInfo returns a description of Tag suitable for JSON or YAML export.
func (m *Tag) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
// always include this required field.
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
if m.Description != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("description"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description))
}
if m.ExternalDocs != nil {
info.Content = append(info.Content, compiler.NewScalarNodeForString("externalDocs"))
info.Content = append(info.Content, m.ExternalDocs.ToRawInfo())
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
// ToRawInfo returns a description of Xml suitable for JSON or YAML export.
func (m *Xml) ToRawInfo() *yaml.Node {
info := compiler.NewMappingNode()
if m == nil {
return info
}
if m.Name != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("name"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Name))
}
if m.Namespace != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("namespace"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Namespace))
}
if m.Prefix != "" {
info.Content = append(info.Content, compiler.NewScalarNodeForString("prefix"))
info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Prefix))
}
if m.Attribute != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("attribute"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Attribute))
}
if m.Wrapped != false {
info.Content = append(info.Content, compiler.NewScalarNodeForString("wrapped"))
info.Content = append(info.Content, compiler.NewScalarNodeForBool(m.Wrapped))
}
if m.SpecificationExtension != nil {
for _, item := range m.SpecificationExtension {
info.Content = append(info.Content, compiler.NewScalarNodeForString(item.Name))
info.Content = append(info.Content, item.Value.ToRawInfo())
}
}
return info
}
var (
pattern0 = regexp.MustCompile("^")
pattern1 = regexp.MustCompile("^x-")
pattern2 = regexp.MustCompile("^/")
pattern3 = regexp.MustCompile("^([0-9X]{3})$")
)
gnostic-models-0.6.8/openapiv3/OpenAPIv3.pb.go 0000664 0000000 0000000 00001116524 14225377162 0021036 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: openapiv3/OpenAPIv3.proto
package openapi_v3
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
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)
)
type AdditionalPropertiesItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *AdditionalPropertiesItem_SchemaOrReference
// *AdditionalPropertiesItem_Boolean
Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"`
}
func (x *AdditionalPropertiesItem) Reset() {
*x = AdditionalPropertiesItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AdditionalPropertiesItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AdditionalPropertiesItem) ProtoMessage() {}
func (x *AdditionalPropertiesItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 AdditionalPropertiesItem.ProtoReflect.Descriptor instead.
func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{0}
}
func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *AdditionalPropertiesItem) GetSchemaOrReference() *SchemaOrReference {
if x, ok := x.GetOneof().(*AdditionalPropertiesItem_SchemaOrReference); ok {
return x.SchemaOrReference
}
return nil
}
func (x *AdditionalPropertiesItem) GetBoolean() bool {
if x, ok := x.GetOneof().(*AdditionalPropertiesItem_Boolean); ok {
return x.Boolean
}
return false
}
type isAdditionalPropertiesItem_Oneof interface {
isAdditionalPropertiesItem_Oneof()
}
type AdditionalPropertiesItem_SchemaOrReference struct {
SchemaOrReference *SchemaOrReference `protobuf:"bytes,1,opt,name=schema_or_reference,json=schemaOrReference,proto3,oneof"`
}
type AdditionalPropertiesItem_Boolean struct {
Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"`
}
func (*AdditionalPropertiesItem_SchemaOrReference) isAdditionalPropertiesItem_Oneof() {}
func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {}
type Any struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value *anypb.Any `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"`
}
func (x *Any) Reset() {
*x = Any{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Any) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Any) ProtoMessage() {}
func (x *Any) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 Any.ProtoReflect.Descriptor instead.
func (*Any) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{1}
}
func (x *Any) GetValue() *anypb.Any {
if x != nil {
return x.Value
}
return nil
}
func (x *Any) GetYaml() string {
if x != nil {
return x.Yaml
}
return ""
}
type AnyOrExpression struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *AnyOrExpression_Any
// *AnyOrExpression_Expression
Oneof isAnyOrExpression_Oneof `protobuf_oneof:"oneof"`
}
func (x *AnyOrExpression) Reset() {
*x = AnyOrExpression{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AnyOrExpression) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnyOrExpression) ProtoMessage() {}
func (x *AnyOrExpression) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 AnyOrExpression.ProtoReflect.Descriptor instead.
func (*AnyOrExpression) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{2}
}
func (m *AnyOrExpression) GetOneof() isAnyOrExpression_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *AnyOrExpression) GetAny() *Any {
if x, ok := x.GetOneof().(*AnyOrExpression_Any); ok {
return x.Any
}
return nil
}
func (x *AnyOrExpression) GetExpression() *Expression {
if x, ok := x.GetOneof().(*AnyOrExpression_Expression); ok {
return x.Expression
}
return nil
}
type isAnyOrExpression_Oneof interface {
isAnyOrExpression_Oneof()
}
type AnyOrExpression_Any struct {
Any *Any `protobuf:"bytes,1,opt,name=any,proto3,oneof"`
}
type AnyOrExpression_Expression struct {
Expression *Expression `protobuf:"bytes,2,opt,name=expression,proto3,oneof"`
}
func (*AnyOrExpression_Any) isAnyOrExpression_Oneof() {}
func (*AnyOrExpression_Expression) isAnyOrExpression_Oneof() {}
// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
type Callback struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path []*NamedPathItem `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,2,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Callback) Reset() {
*x = Callback{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Callback) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Callback) ProtoMessage() {}
func (x *Callback) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 Callback.ProtoReflect.Descriptor instead.
func (*Callback) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{3}
}
func (x *Callback) GetPath() []*NamedPathItem {
if x != nil {
return x.Path
}
return nil
}
func (x *Callback) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type CallbackOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *CallbackOrReference_Callback
// *CallbackOrReference_Reference
Oneof isCallbackOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *CallbackOrReference) Reset() {
*x = CallbackOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallbackOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallbackOrReference) ProtoMessage() {}
func (x *CallbackOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 CallbackOrReference.ProtoReflect.Descriptor instead.
func (*CallbackOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{4}
}
func (m *CallbackOrReference) GetOneof() isCallbackOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *CallbackOrReference) GetCallback() *Callback {
if x, ok := x.GetOneof().(*CallbackOrReference_Callback); ok {
return x.Callback
}
return nil
}
func (x *CallbackOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*CallbackOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isCallbackOrReference_Oneof interface {
isCallbackOrReference_Oneof()
}
type CallbackOrReference_Callback struct {
Callback *Callback `protobuf:"bytes,1,opt,name=callback,proto3,oneof"`
}
type CallbackOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*CallbackOrReference_Callback) isCallbackOrReference_Oneof() {}
func (*CallbackOrReference_Reference) isCallbackOrReference_Oneof() {}
type CallbacksOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedCallbackOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *CallbacksOrReferences) Reset() {
*x = CallbacksOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallbacksOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallbacksOrReferences) ProtoMessage() {}
func (x *CallbacksOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[5]
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 CallbacksOrReferences.ProtoReflect.Descriptor instead.
func (*CallbacksOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{5}
}
func (x *CallbacksOrReferences) GetAdditionalProperties() []*NamedCallbackOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
type Components struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Schemas *SchemasOrReferences `protobuf:"bytes,1,opt,name=schemas,proto3" json:"schemas,omitempty"`
Responses *ResponsesOrReferences `protobuf:"bytes,2,opt,name=responses,proto3" json:"responses,omitempty"`
Parameters *ParametersOrReferences `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
Examples *ExamplesOrReferences `protobuf:"bytes,4,opt,name=examples,proto3" json:"examples,omitempty"`
RequestBodies *RequestBodiesOrReferences `protobuf:"bytes,5,opt,name=request_bodies,json=requestBodies,proto3" json:"request_bodies,omitempty"`
Headers *HeadersOrReferences `protobuf:"bytes,6,opt,name=headers,proto3" json:"headers,omitempty"`
SecuritySchemes *SecuritySchemesOrReferences `protobuf:"bytes,7,opt,name=security_schemes,json=securitySchemes,proto3" json:"security_schemes,omitempty"`
Links *LinksOrReferences `protobuf:"bytes,8,opt,name=links,proto3" json:"links,omitempty"`
Callbacks *CallbacksOrReferences `protobuf:"bytes,9,opt,name=callbacks,proto3" json:"callbacks,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,10,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Components) Reset() {
*x = Components{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Components) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Components) ProtoMessage() {}
func (x *Components) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[6]
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 Components.ProtoReflect.Descriptor instead.
func (*Components) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{6}
}
func (x *Components) GetSchemas() *SchemasOrReferences {
if x != nil {
return x.Schemas
}
return nil
}
func (x *Components) GetResponses() *ResponsesOrReferences {
if x != nil {
return x.Responses
}
return nil
}
func (x *Components) GetParameters() *ParametersOrReferences {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Components) GetExamples() *ExamplesOrReferences {
if x != nil {
return x.Examples
}
return nil
}
func (x *Components) GetRequestBodies() *RequestBodiesOrReferences {
if x != nil {
return x.RequestBodies
}
return nil
}
func (x *Components) GetHeaders() *HeadersOrReferences {
if x != nil {
return x.Headers
}
return nil
}
func (x *Components) GetSecuritySchemes() *SecuritySchemesOrReferences {
if x != nil {
return x.SecuritySchemes
}
return nil
}
func (x *Components) GetLinks() *LinksOrReferences {
if x != nil {
return x.Links
}
return nil
}
func (x *Components) GetCallbacks() *CallbacksOrReferences {
if x != nil {
return x.Callbacks
}
return nil
}
func (x *Components) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// Contact information for the exposed API.
type Contact struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Contact) Reset() {
*x = Contact{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Contact) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Contact) ProtoMessage() {}
func (x *Contact) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[7]
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 Contact.ProtoReflect.Descriptor instead.
func (*Contact) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{7}
}
func (x *Contact) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Contact) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Contact) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *Contact) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type DefaultType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *DefaultType_Number
// *DefaultType_Boolean
// *DefaultType_String_
Oneof isDefaultType_Oneof `protobuf_oneof:"oneof"`
}
func (x *DefaultType) Reset() {
*x = DefaultType{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DefaultType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DefaultType) ProtoMessage() {}
func (x *DefaultType) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[8]
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 DefaultType.ProtoReflect.Descriptor instead.
func (*DefaultType) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{8}
}
func (m *DefaultType) GetOneof() isDefaultType_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *DefaultType) GetNumber() float64 {
if x, ok := x.GetOneof().(*DefaultType_Number); ok {
return x.Number
}
return 0
}
func (x *DefaultType) GetBoolean() bool {
if x, ok := x.GetOneof().(*DefaultType_Boolean); ok {
return x.Boolean
}
return false
}
func (x *DefaultType) GetString_() string {
if x, ok := x.GetOneof().(*DefaultType_String_); ok {
return x.String_
}
return ""
}
type isDefaultType_Oneof interface {
isDefaultType_Oneof()
}
type DefaultType_Number struct {
Number float64 `protobuf:"fixed64,1,opt,name=number,proto3,oneof"`
}
type DefaultType_Boolean struct {
Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"`
}
type DefaultType_String_ struct {
String_ string `protobuf:"bytes,3,opt,name=string,proto3,oneof"`
}
func (*DefaultType_Number) isDefaultType_Oneof() {}
func (*DefaultType_Boolean) isDefaultType_Oneof() {}
func (*DefaultType_String_) isDefaultType_Oneof() {}
// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered.
type Discriminator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PropertyName string `protobuf:"bytes,1,opt,name=property_name,json=propertyName,proto3" json:"property_name,omitempty"`
Mapping *Strings `protobuf:"bytes,2,opt,name=mapping,proto3" json:"mapping,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Discriminator) Reset() {
*x = Discriminator{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Discriminator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Discriminator) ProtoMessage() {}
func (x *Discriminator) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_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 Discriminator.ProtoReflect.Descriptor instead.
func (*Discriminator) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{9}
}
func (x *Discriminator) GetPropertyName() string {
if x != nil {
return x.PropertyName
}
return ""
}
func (x *Discriminator) GetMapping() *Strings {
if x != nil {
return x.Mapping
}
return nil
}
func (x *Discriminator) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type Document struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Openapi string `protobuf:"bytes,1,opt,name=openapi,proto3" json:"openapi,omitempty"`
Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
Servers []*Server `protobuf:"bytes,3,rep,name=servers,proto3" json:"servers,omitempty"`
Paths *Paths `protobuf:"bytes,4,opt,name=paths,proto3" json:"paths,omitempty"`
Components *Components `protobuf:"bytes,5,opt,name=components,proto3" json:"components,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,6,rep,name=security,proto3" json:"security,omitempty"`
Tags []*Tag `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,9,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Document) Reset() {
*x = Document{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Document) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Document) ProtoMessage() {}
func (x *Document) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[10]
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 Document.ProtoReflect.Descriptor instead.
func (*Document) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{10}
}
func (x *Document) GetOpenapi() string {
if x != nil {
return x.Openapi
}
return ""
}
func (x *Document) GetInfo() *Info {
if x != nil {
return x.Info
}
return nil
}
func (x *Document) GetServers() []*Server {
if x != nil {
return x.Servers
}
return nil
}
func (x *Document) GetPaths() *Paths {
if x != nil {
return x.Paths
}
return nil
}
func (x *Document) GetComponents() *Components {
if x != nil {
return x.Components
}
return nil
}
func (x *Document) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Document) GetTags() []*Tag {
if x != nil {
return x.Tags
}
return nil
}
func (x *Document) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Document) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// A single encoding definition applied to a single schema property.
type Encoding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
Headers *HeadersOrReferences `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"`
Style string `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"`
Explode bool `protobuf:"varint,4,opt,name=explode,proto3" json:"explode,omitempty"`
AllowReserved bool `protobuf:"varint,5,opt,name=allow_reserved,json=allowReserved,proto3" json:"allow_reserved,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,6,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Encoding) Reset() {
*x = Encoding{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Encoding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Encoding) ProtoMessage() {}
func (x *Encoding) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[11]
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 Encoding.ProtoReflect.Descriptor instead.
func (*Encoding) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{11}
}
func (x *Encoding) GetContentType() string {
if x != nil {
return x.ContentType
}
return ""
}
func (x *Encoding) GetHeaders() *HeadersOrReferences {
if x != nil {
return x.Headers
}
return nil
}
func (x *Encoding) GetStyle() string {
if x != nil {
return x.Style
}
return ""
}
func (x *Encoding) GetExplode() bool {
if x != nil {
return x.Explode
}
return false
}
func (x *Encoding) GetAllowReserved() bool {
if x != nil {
return x.AllowReserved
}
return false
}
func (x *Encoding) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type Encodings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedEncoding `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Encodings) Reset() {
*x = Encodings{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Encodings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Encodings) ProtoMessage() {}
func (x *Encodings) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[12]
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 Encodings.ProtoReflect.Descriptor instead.
func (*Encodings) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{12}
}
func (x *Encodings) GetAdditionalProperties() []*NamedEncoding {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Example struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Value *Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
ExternalValue string `protobuf:"bytes,4,opt,name=external_value,json=externalValue,proto3" json:"external_value,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Example) Reset() {
*x = Example{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Example) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Example) ProtoMessage() {}
func (x *Example) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[13]
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 Example.ProtoReflect.Descriptor instead.
func (*Example) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{13}
}
func (x *Example) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *Example) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Example) GetValue() *Any {
if x != nil {
return x.Value
}
return nil
}
func (x *Example) GetExternalValue() string {
if x != nil {
return x.ExternalValue
}
return ""
}
func (x *Example) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type ExampleOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *ExampleOrReference_Example
// *ExampleOrReference_Reference
Oneof isExampleOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *ExampleOrReference) Reset() {
*x = ExampleOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExampleOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExampleOrReference) ProtoMessage() {}
func (x *ExampleOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[14]
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 ExampleOrReference.ProtoReflect.Descriptor instead.
func (*ExampleOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{14}
}
func (m *ExampleOrReference) GetOneof() isExampleOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *ExampleOrReference) GetExample() *Example {
if x, ok := x.GetOneof().(*ExampleOrReference_Example); ok {
return x.Example
}
return nil
}
func (x *ExampleOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*ExampleOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isExampleOrReference_Oneof interface {
isExampleOrReference_Oneof()
}
type ExampleOrReference_Example struct {
Example *Example `protobuf:"bytes,1,opt,name=example,proto3,oneof"`
}
type ExampleOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*ExampleOrReference_Example) isExampleOrReference_Oneof() {}
func (*ExampleOrReference_Reference) isExampleOrReference_Oneof() {}
type ExamplesOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedExampleOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ExamplesOrReferences) Reset() {
*x = ExamplesOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExamplesOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExamplesOrReferences) ProtoMessage() {}
func (x *ExamplesOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[15]
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 ExamplesOrReferences.ProtoReflect.Descriptor instead.
func (*ExamplesOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{15}
}
func (x *ExamplesOrReferences) GetAdditionalProperties() []*NamedExampleOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
type Expression struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Expression) Reset() {
*x = Expression{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Expression) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Expression) ProtoMessage() {}
func (x *Expression) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[16]
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 Expression.ProtoReflect.Descriptor instead.
func (*Expression) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{16}
}
func (x *Expression) GetAdditionalProperties() []*NamedAny {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Allows referencing an external resource for extended documentation.
type ExternalDocs struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *ExternalDocs) Reset() {
*x = ExternalDocs{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExternalDocs) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExternalDocs) ProtoMessage() {}
func (x *ExternalDocs) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[17]
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 ExternalDocs.ProtoReflect.Descriptor instead.
func (*ExternalDocs) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{17}
}
func (x *ExternalDocs) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ExternalDocs) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *ExternalDocs) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`).
type Header struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
Deprecated bool `protobuf:"varint,3,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
AllowEmptyValue bool `protobuf:"varint,4,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"`
Style string `protobuf:"bytes,5,opt,name=style,proto3" json:"style,omitempty"`
Explode bool `protobuf:"varint,6,opt,name=explode,proto3" json:"explode,omitempty"`
AllowReserved bool `protobuf:"varint,7,opt,name=allow_reserved,json=allowReserved,proto3" json:"allow_reserved,omitempty"`
Schema *SchemaOrReference `protobuf:"bytes,8,opt,name=schema,proto3" json:"schema,omitempty"`
Example *Any `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"`
Examples *ExamplesOrReferences `protobuf:"bytes,10,opt,name=examples,proto3" json:"examples,omitempty"`
Content *MediaTypes `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,12,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Header) Reset() {
*x = Header{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Header) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Header) ProtoMessage() {}
func (x *Header) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[18]
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 Header.ProtoReflect.Descriptor instead.
func (*Header) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{18}
}
func (x *Header) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Header) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *Header) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Header) GetAllowEmptyValue() bool {
if x != nil {
return x.AllowEmptyValue
}
return false
}
func (x *Header) GetStyle() string {
if x != nil {
return x.Style
}
return ""
}
func (x *Header) GetExplode() bool {
if x != nil {
return x.Explode
}
return false
}
func (x *Header) GetAllowReserved() bool {
if x != nil {
return x.AllowReserved
}
return false
}
func (x *Header) GetSchema() *SchemaOrReference {
if x != nil {
return x.Schema
}
return nil
}
func (x *Header) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *Header) GetExamples() *ExamplesOrReferences {
if x != nil {
return x.Examples
}
return nil
}
func (x *Header) GetContent() *MediaTypes {
if x != nil {
return x.Content
}
return nil
}
func (x *Header) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type HeaderOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *HeaderOrReference_Header
// *HeaderOrReference_Reference
Oneof isHeaderOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *HeaderOrReference) Reset() {
*x = HeaderOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeaderOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeaderOrReference) ProtoMessage() {}
func (x *HeaderOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[19]
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 HeaderOrReference.ProtoReflect.Descriptor instead.
func (*HeaderOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{19}
}
func (m *HeaderOrReference) GetOneof() isHeaderOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *HeaderOrReference) GetHeader() *Header {
if x, ok := x.GetOneof().(*HeaderOrReference_Header); ok {
return x.Header
}
return nil
}
func (x *HeaderOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*HeaderOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isHeaderOrReference_Oneof interface {
isHeaderOrReference_Oneof()
}
type HeaderOrReference_Header struct {
Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}
type HeaderOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*HeaderOrReference_Header) isHeaderOrReference_Oneof() {}
func (*HeaderOrReference_Reference) isHeaderOrReference_Oneof() {}
type HeadersOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedHeaderOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *HeadersOrReferences) Reset() {
*x = HeadersOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeadersOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeadersOrReferences) ProtoMessage() {}
func (x *HeadersOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[20]
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 HeadersOrReferences.ProtoReflect.Descriptor instead.
func (*HeadersOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{20}
}
func (x *HeadersOrReferences) GetAdditionalProperties() []*NamedHeaderOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
type Info struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"`
Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"`
License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`
Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,7,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
Summary string `protobuf:"bytes,8,opt,name=summary,proto3" json:"summary,omitempty"`
}
func (x *Info) Reset() {
*x = Info{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Info) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Info) ProtoMessage() {}
func (x *Info) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[21]
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 Info.ProtoReflect.Descriptor instead.
func (*Info) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{21}
}
func (x *Info) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Info) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Info) GetTermsOfService() string {
if x != nil {
return x.TermsOfService
}
return ""
}
func (x *Info) GetContact() *Contact {
if x != nil {
return x.Contact
}
return nil
}
func (x *Info) GetLicense() *License {
if x != nil {
return x.License
}
return nil
}
func (x *Info) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Info) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
func (x *Info) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
type ItemsItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SchemaOrReference []*SchemaOrReference `protobuf:"bytes,1,rep,name=schema_or_reference,json=schemaOrReference,proto3" json:"schema_or_reference,omitempty"`
}
func (x *ItemsItem) Reset() {
*x = ItemsItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ItemsItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ItemsItem) ProtoMessage() {}
func (x *ItemsItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[22]
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 ItemsItem.ProtoReflect.Descriptor instead.
func (*ItemsItem) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{22}
}
func (x *ItemsItem) GetSchemaOrReference() []*SchemaOrReference {
if x != nil {
return x.SchemaOrReference
}
return nil
}
// License information for the exposed API.
type License struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *License) Reset() {
*x = License{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *License) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*License) ProtoMessage() {}
func (x *License) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[23]
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 License.ProtoReflect.Descriptor instead.
func (*License) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{23}
}
func (x *License) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *License) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *License) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
type Link struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OperationRef string `protobuf:"bytes,1,opt,name=operation_ref,json=operationRef,proto3" json:"operation_ref,omitempty"`
OperationId string `protobuf:"bytes,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
Parameters *AnyOrExpression `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
RequestBody *AnyOrExpression `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3" json:"request_body,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
Server *Server `protobuf:"bytes,6,opt,name=server,proto3" json:"server,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,7,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Link) Reset() {
*x = Link{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Link) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Link) ProtoMessage() {}
func (x *Link) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[24]
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 Link.ProtoReflect.Descriptor instead.
func (*Link) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{24}
}
func (x *Link) GetOperationRef() string {
if x != nil {
return x.OperationRef
}
return ""
}
func (x *Link) GetOperationId() string {
if x != nil {
return x.OperationId
}
return ""
}
func (x *Link) GetParameters() *AnyOrExpression {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Link) GetRequestBody() *AnyOrExpression {
if x != nil {
return x.RequestBody
}
return nil
}
func (x *Link) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Link) GetServer() *Server {
if x != nil {
return x.Server
}
return nil
}
func (x *Link) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type LinkOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *LinkOrReference_Link
// *LinkOrReference_Reference
Oneof isLinkOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *LinkOrReference) Reset() {
*x = LinkOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LinkOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinkOrReference) ProtoMessage() {}
func (x *LinkOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[25]
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 LinkOrReference.ProtoReflect.Descriptor instead.
func (*LinkOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{25}
}
func (m *LinkOrReference) GetOneof() isLinkOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *LinkOrReference) GetLink() *Link {
if x, ok := x.GetOneof().(*LinkOrReference_Link); ok {
return x.Link
}
return nil
}
func (x *LinkOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*LinkOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isLinkOrReference_Oneof interface {
isLinkOrReference_Oneof()
}
type LinkOrReference_Link struct {
Link *Link `protobuf:"bytes,1,opt,name=link,proto3,oneof"`
}
type LinkOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*LinkOrReference_Link) isLinkOrReference_Oneof() {}
func (*LinkOrReference_Reference) isLinkOrReference_Oneof() {}
type LinksOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedLinkOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *LinksOrReferences) Reset() {
*x = LinksOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LinksOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinksOrReferences) ProtoMessage() {}
func (x *LinksOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[26]
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 LinksOrReferences.ProtoReflect.Descriptor instead.
func (*LinksOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{26}
}
func (x *LinksOrReferences) GetAdditionalProperties() []*NamedLinkOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Each Media Type Object provides schema and examples for the media type identified by its key.
type MediaType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Schema *SchemaOrReference `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
Example *Any `protobuf:"bytes,2,opt,name=example,proto3" json:"example,omitempty"`
Examples *ExamplesOrReferences `protobuf:"bytes,3,opt,name=examples,proto3" json:"examples,omitempty"`
Encoding *Encodings `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *MediaType) Reset() {
*x = MediaType{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaType) ProtoMessage() {}
func (x *MediaType) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[27]
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 MediaType.ProtoReflect.Descriptor instead.
func (*MediaType) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{27}
}
func (x *MediaType) GetSchema() *SchemaOrReference {
if x != nil {
return x.Schema
}
return nil
}
func (x *MediaType) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *MediaType) GetExamples() *ExamplesOrReferences {
if x != nil {
return x.Examples
}
return nil
}
func (x *MediaType) GetEncoding() *Encodings {
if x != nil {
return x.Encoding
}
return nil
}
func (x *MediaType) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type MediaTypes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedMediaType `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *MediaTypes) Reset() {
*x = MediaTypes{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MediaTypes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MediaTypes) ProtoMessage() {}
func (x *MediaTypes) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[28]
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 MediaTypes.ProtoReflect.Descriptor instead.
func (*MediaTypes) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{28}
}
func (x *MediaTypes) GetAdditionalProperties() []*NamedMediaType {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
type NamedAny struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedAny) Reset() {
*x = NamedAny{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedAny) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedAny) ProtoMessage() {}
func (x *NamedAny) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[29]
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 NamedAny.ProtoReflect.Descriptor instead.
func (*NamedAny) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{29}
}
func (x *NamedAny) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedAny) GetValue() *Any {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs.
type NamedCallbackOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *CallbackOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedCallbackOrReference) Reset() {
*x = NamedCallbackOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedCallbackOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedCallbackOrReference) ProtoMessage() {}
func (x *NamedCallbackOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[30]
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 NamedCallbackOrReference.ProtoReflect.Descriptor instead.
func (*NamedCallbackOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{30}
}
func (x *NamedCallbackOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedCallbackOrReference) GetValue() *CallbackOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs.
type NamedEncoding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *Encoding `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedEncoding) Reset() {
*x = NamedEncoding{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedEncoding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedEncoding) ProtoMessage() {}
func (x *NamedEncoding) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[31]
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 NamedEncoding.ProtoReflect.Descriptor instead.
func (*NamedEncoding) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{31}
}
func (x *NamedEncoding) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedEncoding) GetValue() *Encoding {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs.
type NamedExampleOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *ExampleOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedExampleOrReference) Reset() {
*x = NamedExampleOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedExampleOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedExampleOrReference) ProtoMessage() {}
func (x *NamedExampleOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[32]
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 NamedExampleOrReference.ProtoReflect.Descriptor instead.
func (*NamedExampleOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{32}
}
func (x *NamedExampleOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedExampleOrReference) GetValue() *ExampleOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs.
type NamedHeaderOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *HeaderOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedHeaderOrReference) Reset() {
*x = NamedHeaderOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedHeaderOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedHeaderOrReference) ProtoMessage() {}
func (x *NamedHeaderOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[33]
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 NamedHeaderOrReference.ProtoReflect.Descriptor instead.
func (*NamedHeaderOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{33}
}
func (x *NamedHeaderOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedHeaderOrReference) GetValue() *HeaderOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs.
type NamedLinkOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *LinkOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedLinkOrReference) Reset() {
*x = NamedLinkOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedLinkOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedLinkOrReference) ProtoMessage() {}
func (x *NamedLinkOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[34]
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 NamedLinkOrReference.ProtoReflect.Descriptor instead.
func (*NamedLinkOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{34}
}
func (x *NamedLinkOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedLinkOrReference) GetValue() *LinkOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs.
type NamedMediaType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *MediaType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedMediaType) Reset() {
*x = NamedMediaType{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedMediaType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedMediaType) ProtoMessage() {}
func (x *NamedMediaType) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[35]
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 NamedMediaType.ProtoReflect.Descriptor instead.
func (*NamedMediaType) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{35}
}
func (x *NamedMediaType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedMediaType) GetValue() *MediaType {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs.
type NamedParameterOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *ParameterOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedParameterOrReference) Reset() {
*x = NamedParameterOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedParameterOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedParameterOrReference) ProtoMessage() {}
func (x *NamedParameterOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[36]
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 NamedParameterOrReference.ProtoReflect.Descriptor instead.
func (*NamedParameterOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{36}
}
func (x *NamedParameterOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedParameterOrReference) GetValue() *ParameterOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
type NamedPathItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *PathItem `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedPathItem) Reset() {
*x = NamedPathItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedPathItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedPathItem) ProtoMessage() {}
func (x *NamedPathItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[37]
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 NamedPathItem.ProtoReflect.Descriptor instead.
func (*NamedPathItem) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{37}
}
func (x *NamedPathItem) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedPathItem) GetValue() *PathItem {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs.
type NamedRequestBodyOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *RequestBodyOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedRequestBodyOrReference) Reset() {
*x = NamedRequestBodyOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedRequestBodyOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedRequestBodyOrReference) ProtoMessage() {}
func (x *NamedRequestBodyOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[38]
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 NamedRequestBodyOrReference.ProtoReflect.Descriptor instead.
func (*NamedRequestBodyOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{38}
}
func (x *NamedRequestBodyOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedRequestBodyOrReference) GetValue() *RequestBodyOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs.
type NamedResponseOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *ResponseOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedResponseOrReference) Reset() {
*x = NamedResponseOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedResponseOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedResponseOrReference) ProtoMessage() {}
func (x *NamedResponseOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[39]
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 NamedResponseOrReference.ProtoReflect.Descriptor instead.
func (*NamedResponseOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{39}
}
func (x *NamedResponseOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedResponseOrReference) GetValue() *ResponseOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs.
type NamedSchemaOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *SchemaOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedSchemaOrReference) Reset() {
*x = NamedSchemaOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedSchemaOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedSchemaOrReference) ProtoMessage() {}
func (x *NamedSchemaOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[40]
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 NamedSchemaOrReference.ProtoReflect.Descriptor instead.
func (*NamedSchemaOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{40}
}
func (x *NamedSchemaOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedSchemaOrReference) GetValue() *SchemaOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs.
type NamedSecuritySchemeOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *SecuritySchemeOrReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedSecuritySchemeOrReference) Reset() {
*x = NamedSecuritySchemeOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedSecuritySchemeOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedSecuritySchemeOrReference) ProtoMessage() {}
func (x *NamedSecuritySchemeOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[41]
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 NamedSecuritySchemeOrReference.ProtoReflect.Descriptor instead.
func (*NamedSecuritySchemeOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{41}
}
func (x *NamedSecuritySchemeOrReference) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedSecuritySchemeOrReference) GetValue() *SecuritySchemeOrReference {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs.
type NamedServerVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *ServerVariable `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedServerVariable) Reset() {
*x = NamedServerVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedServerVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedServerVariable) ProtoMessage() {}
func (x *NamedServerVariable) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[42]
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 NamedServerVariable.ProtoReflect.Descriptor instead.
func (*NamedServerVariable) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{42}
}
func (x *NamedServerVariable) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedServerVariable) GetValue() *ServerVariable {
if x != nil {
return x.Value
}
return nil
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
type NamedString struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedString) Reset() {
*x = NamedString{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedString) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedString) ProtoMessage() {}
func (x *NamedString) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[43]
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 NamedString.ProtoReflect.Descriptor instead.
func (*NamedString) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{43}
}
func (x *NamedString) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedString) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
type NamedStringArray struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map key
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Mapped value
Value *StringArray `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NamedStringArray) Reset() {
*x = NamedStringArray{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NamedStringArray) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NamedStringArray) ProtoMessage() {}
func (x *NamedStringArray) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[44]
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 NamedStringArray.ProtoReflect.Descriptor instead.
func (*NamedStringArray) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{44}
}
func (x *NamedStringArray) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NamedStringArray) GetValue() *StringArray {
if x != nil {
return x.Value
}
return nil
}
// Configuration details for a supported OAuth Flow
type OauthFlow struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AuthorizationUrl string `protobuf:"bytes,1,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"`
TokenUrl string `protobuf:"bytes,2,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
RefreshUrl string `protobuf:"bytes,3,opt,name=refresh_url,json=refreshUrl,proto3" json:"refresh_url,omitempty"`
Scopes *Strings `protobuf:"bytes,4,opt,name=scopes,proto3" json:"scopes,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *OauthFlow) Reset() {
*x = OauthFlow{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OauthFlow) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OauthFlow) ProtoMessage() {}
func (x *OauthFlow) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[45]
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 OauthFlow.ProtoReflect.Descriptor instead.
func (*OauthFlow) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{45}
}
func (x *OauthFlow) GetAuthorizationUrl() string {
if x != nil {
return x.AuthorizationUrl
}
return ""
}
func (x *OauthFlow) GetTokenUrl() string {
if x != nil {
return x.TokenUrl
}
return ""
}
func (x *OauthFlow) GetRefreshUrl() string {
if x != nil {
return x.RefreshUrl
}
return ""
}
func (x *OauthFlow) GetScopes() *Strings {
if x != nil {
return x.Scopes
}
return nil
}
func (x *OauthFlow) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// Allows configuration of the supported OAuth Flows.
type OauthFlows struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Implicit *OauthFlow `protobuf:"bytes,1,opt,name=implicit,proto3" json:"implicit,omitempty"`
Password *OauthFlow `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
ClientCredentials *OauthFlow `protobuf:"bytes,3,opt,name=client_credentials,json=clientCredentials,proto3" json:"client_credentials,omitempty"`
AuthorizationCode *OauthFlow `protobuf:"bytes,4,opt,name=authorization_code,json=authorizationCode,proto3" json:"authorization_code,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *OauthFlows) Reset() {
*x = OauthFlows{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OauthFlows) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OauthFlows) ProtoMessage() {}
func (x *OauthFlows) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[46]
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 OauthFlows.ProtoReflect.Descriptor instead.
func (*OauthFlows) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{46}
}
func (x *OauthFlows) GetImplicit() *OauthFlow {
if x != nil {
return x.Implicit
}
return nil
}
func (x *OauthFlows) GetPassword() *OauthFlow {
if x != nil {
return x.Password
}
return nil
}
func (x *OauthFlows) GetClientCredentials() *OauthFlow {
if x != nil {
return x.ClientCredentials
}
return nil
}
func (x *OauthFlows) GetAuthorizationCode() *OauthFlow {
if x != nil {
return x.AuthorizationCode
}
return nil
}
func (x *OauthFlows) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type Object struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Object) Reset() {
*x = Object{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Object) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Object) ProtoMessage() {}
func (x *Object) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[47]
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 Object.ProtoReflect.Descriptor instead.
func (*Object) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{47}
}
func (x *Object) GetAdditionalProperties() []*NamedAny {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Describes a single API operation on a path.
type Operation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
Parameters []*ParameterOrReference `protobuf:"bytes,6,rep,name=parameters,proto3" json:"parameters,omitempty"`
RequestBody *RequestBodyOrReference `protobuf:"bytes,7,opt,name=request_body,json=requestBody,proto3" json:"request_body,omitempty"`
Responses *Responses `protobuf:"bytes,8,opt,name=responses,proto3" json:"responses,omitempty"`
Callbacks *CallbacksOrReferences `protobuf:"bytes,9,opt,name=callbacks,proto3" json:"callbacks,omitempty"`
Deprecated bool `protobuf:"varint,10,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,11,rep,name=security,proto3" json:"security,omitempty"`
Servers []*Server `protobuf:"bytes,12,rep,name=servers,proto3" json:"servers,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,13,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Operation) Reset() {
*x = Operation{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Operation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Operation) ProtoMessage() {}
func (x *Operation) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[48]
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 Operation.ProtoReflect.Descriptor instead.
func (*Operation) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{48}
}
func (x *Operation) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
func (x *Operation) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *Operation) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Operation) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Operation) GetOperationId() string {
if x != nil {
return x.OperationId
}
return ""
}
func (x *Operation) GetParameters() []*ParameterOrReference {
if x != nil {
return x.Parameters
}
return nil
}
func (x *Operation) GetRequestBody() *RequestBodyOrReference {
if x != nil {
return x.RequestBody
}
return nil
}
func (x *Operation) GetResponses() *Responses {
if x != nil {
return x.Responses
}
return nil
}
func (x *Operation) GetCallbacks() *CallbacksOrReferences {
if x != nil {
return x.Callbacks
}
return nil
}
func (x *Operation) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Operation) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Operation) GetServers() []*Server {
if x != nil {
return x.Servers
}
return nil
}
func (x *Operation) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.
type Parameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
In string `protobuf:"bytes,2,opt,name=in,proto3" json:"in,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
AllowEmptyValue bool `protobuf:"varint,6,opt,name=allow_empty_value,json=allowEmptyValue,proto3" json:"allow_empty_value,omitempty"`
Style string `protobuf:"bytes,7,opt,name=style,proto3" json:"style,omitempty"`
Explode bool `protobuf:"varint,8,opt,name=explode,proto3" json:"explode,omitempty"`
AllowReserved bool `protobuf:"varint,9,opt,name=allow_reserved,json=allowReserved,proto3" json:"allow_reserved,omitempty"`
Schema *SchemaOrReference `protobuf:"bytes,10,opt,name=schema,proto3" json:"schema,omitempty"`
Example *Any `protobuf:"bytes,11,opt,name=example,proto3" json:"example,omitempty"`
Examples *ExamplesOrReferences `protobuf:"bytes,12,opt,name=examples,proto3" json:"examples,omitempty"`
Content *MediaTypes `protobuf:"bytes,13,opt,name=content,proto3" json:"content,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,14,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Parameter) Reset() {
*x = Parameter{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Parameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Parameter) ProtoMessage() {}
func (x *Parameter) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[49]
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 Parameter.ProtoReflect.Descriptor instead.
func (*Parameter) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{49}
}
func (x *Parameter) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Parameter) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *Parameter) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Parameter) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *Parameter) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Parameter) GetAllowEmptyValue() bool {
if x != nil {
return x.AllowEmptyValue
}
return false
}
func (x *Parameter) GetStyle() string {
if x != nil {
return x.Style
}
return ""
}
func (x *Parameter) GetExplode() bool {
if x != nil {
return x.Explode
}
return false
}
func (x *Parameter) GetAllowReserved() bool {
if x != nil {
return x.AllowReserved
}
return false
}
func (x *Parameter) GetSchema() *SchemaOrReference {
if x != nil {
return x.Schema
}
return nil
}
func (x *Parameter) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *Parameter) GetExamples() *ExamplesOrReferences {
if x != nil {
return x.Examples
}
return nil
}
func (x *Parameter) GetContent() *MediaTypes {
if x != nil {
return x.Content
}
return nil
}
func (x *Parameter) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type ParameterOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *ParameterOrReference_Parameter
// *ParameterOrReference_Reference
Oneof isParameterOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *ParameterOrReference) Reset() {
*x = ParameterOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ParameterOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ParameterOrReference) ProtoMessage() {}
func (x *ParameterOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[50]
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 ParameterOrReference.ProtoReflect.Descriptor instead.
func (*ParameterOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{50}
}
func (m *ParameterOrReference) GetOneof() isParameterOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *ParameterOrReference) GetParameter() *Parameter {
if x, ok := x.GetOneof().(*ParameterOrReference_Parameter); ok {
return x.Parameter
}
return nil
}
func (x *ParameterOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*ParameterOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isParameterOrReference_Oneof interface {
isParameterOrReference_Oneof()
}
type ParameterOrReference_Parameter struct {
Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,proto3,oneof"`
}
type ParameterOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*ParameterOrReference_Parameter) isParameterOrReference_Oneof() {}
func (*ParameterOrReference_Reference) isParameterOrReference_Oneof() {}
type ParametersOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedParameterOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ParametersOrReferences) Reset() {
*x = ParametersOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ParametersOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ParametersOrReferences) ProtoMessage() {}
func (x *ParametersOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[51]
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 ParametersOrReferences.ProtoReflect.Descriptor instead.
func (*ParametersOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{51}
}
func (x *ParametersOrReferences) GetAdditionalProperties() []*NamedParameterOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
type PathItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Get *Operation `protobuf:"bytes,4,opt,name=get,proto3" json:"get,omitempty"`
Put *Operation `protobuf:"bytes,5,opt,name=put,proto3" json:"put,omitempty"`
Post *Operation `protobuf:"bytes,6,opt,name=post,proto3" json:"post,omitempty"`
Delete *Operation `protobuf:"bytes,7,opt,name=delete,proto3" json:"delete,omitempty"`
Options *Operation `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"`
Head *Operation `protobuf:"bytes,9,opt,name=head,proto3" json:"head,omitempty"`
Patch *Operation `protobuf:"bytes,10,opt,name=patch,proto3" json:"patch,omitempty"`
Trace *Operation `protobuf:"bytes,11,opt,name=trace,proto3" json:"trace,omitempty"`
Servers []*Server `protobuf:"bytes,12,rep,name=servers,proto3" json:"servers,omitempty"`
Parameters []*ParameterOrReference `protobuf:"bytes,13,rep,name=parameters,proto3" json:"parameters,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,14,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *PathItem) Reset() {
*x = PathItem{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PathItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PathItem) ProtoMessage() {}
func (x *PathItem) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[52]
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 PathItem.ProtoReflect.Descriptor instead.
func (*PathItem) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{52}
}
func (x *PathItem) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *PathItem) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *PathItem) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *PathItem) GetGet() *Operation {
if x != nil {
return x.Get
}
return nil
}
func (x *PathItem) GetPut() *Operation {
if x != nil {
return x.Put
}
return nil
}
func (x *PathItem) GetPost() *Operation {
if x != nil {
return x.Post
}
return nil
}
func (x *PathItem) GetDelete() *Operation {
if x != nil {
return x.Delete
}
return nil
}
func (x *PathItem) GetOptions() *Operation {
if x != nil {
return x.Options
}
return nil
}
func (x *PathItem) GetHead() *Operation {
if x != nil {
return x.Head
}
return nil
}
func (x *PathItem) GetPatch() *Operation {
if x != nil {
return x.Patch
}
return nil
}
func (x *PathItem) GetTrace() *Operation {
if x != nil {
return x.Trace
}
return nil
}
func (x *PathItem) GetServers() []*Server {
if x != nil {
return x.Servers
}
return nil
}
func (x *PathItem) GetParameters() []*ParameterOrReference {
if x != nil {
return x.Parameters
}
return nil
}
func (x *PathItem) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.
type Paths struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path []*NamedPathItem `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,2,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Paths) Reset() {
*x = Paths{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Paths) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Paths) ProtoMessage() {}
func (x *Paths) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[53]
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 Paths.ProtoReflect.Descriptor instead.
func (*Paths) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{53}
}
func (x *Paths) GetPath() []*NamedPathItem {
if x != nil {
return x.Path
}
return nil
}
func (x *Paths) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type Properties struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSchemaOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Properties) Reset() {
*x = Properties{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Properties) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Properties) ProtoMessage() {}
func (x *Properties) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[54]
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 Properties.ProtoReflect.Descriptor instead.
func (*Properties) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{54}
}
func (x *Properties) GetAdditionalProperties() []*NamedSchemaOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.
type Reference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *Reference) Reset() {
*x = Reference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Reference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Reference) ProtoMessage() {}
func (x *Reference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[55]
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 Reference.ProtoReflect.Descriptor instead.
func (*Reference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{55}
}
func (x *Reference) GetXRef() string {
if x != nil {
return x.XRef
}
return ""
}
func (x *Reference) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *Reference) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type RequestBodiesOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedRequestBodyOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *RequestBodiesOrReferences) Reset() {
*x = RequestBodiesOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestBodiesOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestBodiesOrReferences) ProtoMessage() {}
func (x *RequestBodiesOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[56]
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 RequestBodiesOrReferences.ProtoReflect.Descriptor instead.
func (*RequestBodiesOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{56}
}
func (x *RequestBodiesOrReferences) GetAdditionalProperties() []*NamedRequestBodyOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Describes a single request body.
type RequestBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Content *MediaTypes `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *RequestBody) Reset() {
*x = RequestBody{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestBody) ProtoMessage() {}
func (x *RequestBody) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[57]
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 RequestBody.ProtoReflect.Descriptor instead.
func (*RequestBody) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{57}
}
func (x *RequestBody) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *RequestBody) GetContent() *MediaTypes {
if x != nil {
return x.Content
}
return nil
}
func (x *RequestBody) GetRequired() bool {
if x != nil {
return x.Required
}
return false
}
func (x *RequestBody) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type RequestBodyOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *RequestBodyOrReference_RequestBody
// *RequestBodyOrReference_Reference
Oneof isRequestBodyOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *RequestBodyOrReference) Reset() {
*x = RequestBodyOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestBodyOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestBodyOrReference) ProtoMessage() {}
func (x *RequestBodyOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[58]
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 RequestBodyOrReference.ProtoReflect.Descriptor instead.
func (*RequestBodyOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{58}
}
func (m *RequestBodyOrReference) GetOneof() isRequestBodyOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *RequestBodyOrReference) GetRequestBody() *RequestBody {
if x, ok := x.GetOneof().(*RequestBodyOrReference_RequestBody); ok {
return x.RequestBody
}
return nil
}
func (x *RequestBodyOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*RequestBodyOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isRequestBodyOrReference_Oneof interface {
isRequestBodyOrReference_Oneof()
}
type RequestBodyOrReference_RequestBody struct {
RequestBody *RequestBody `protobuf:"bytes,1,opt,name=request_body,json=requestBody,proto3,oneof"`
}
type RequestBodyOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*RequestBodyOrReference_RequestBody) isRequestBodyOrReference_Oneof() {}
func (*RequestBodyOrReference_Reference) isRequestBodyOrReference_Oneof() {}
// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Headers *HeadersOrReferences `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"`
Content *MediaTypes `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
Links *LinksOrReferences `protobuf:"bytes,4,opt,name=links,proto3" json:"links,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[59]
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 Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{59}
}
func (x *Response) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Response) GetHeaders() *HeadersOrReferences {
if x != nil {
return x.Headers
}
return nil
}
func (x *Response) GetContent() *MediaTypes {
if x != nil {
return x.Content
}
return nil
}
func (x *Response) GetLinks() *LinksOrReferences {
if x != nil {
return x.Links
}
return nil
}
func (x *Response) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type ResponseOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *ResponseOrReference_Response
// *ResponseOrReference_Reference
Oneof isResponseOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *ResponseOrReference) Reset() {
*x = ResponseOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[60]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseOrReference) ProtoMessage() {}
func (x *ResponseOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[60]
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 ResponseOrReference.ProtoReflect.Descriptor instead.
func (*ResponseOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{60}
}
func (m *ResponseOrReference) GetOneof() isResponseOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *ResponseOrReference) GetResponse() *Response {
if x, ok := x.GetOneof().(*ResponseOrReference_Response); ok {
return x.Response
}
return nil
}
func (x *ResponseOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*ResponseOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isResponseOrReference_Oneof interface {
isResponseOrReference_Oneof()
}
type ResponseOrReference_Response struct {
Response *Response `protobuf:"bytes,1,opt,name=response,proto3,oneof"`
}
type ResponseOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*ResponseOrReference_Response) isResponseOrReference_Oneof() {}
func (*ResponseOrReference_Reference) isResponseOrReference_Oneof() {}
// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.
type Responses struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Default *ResponseOrReference `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"`
ResponseOrReference []*NamedResponseOrReference `protobuf:"bytes,2,rep,name=response_or_reference,json=responseOrReference,proto3" json:"response_or_reference,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Responses) Reset() {
*x = Responses{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[61]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Responses) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Responses) ProtoMessage() {}
func (x *Responses) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[61]
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 Responses.ProtoReflect.Descriptor instead.
func (*Responses) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{61}
}
func (x *Responses) GetDefault() *ResponseOrReference {
if x != nil {
return x.Default
}
return nil
}
func (x *Responses) GetResponseOrReference() []*NamedResponseOrReference {
if x != nil {
return x.ResponseOrReference
}
return nil
}
func (x *Responses) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type ResponsesOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedResponseOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ResponsesOrReferences) Reset() {
*x = ResponsesOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[62]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponsesOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponsesOrReferences) ProtoMessage() {}
func (x *ResponsesOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[62]
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 ResponsesOrReferences.ProtoReflect.Descriptor instead.
func (*ResponsesOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{62}
}
func (x *ResponsesOrReferences) GetAdditionalProperties() []*NamedResponseOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.
type Schema struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Nullable bool `protobuf:"varint,1,opt,name=nullable,proto3" json:"nullable,omitempty"`
Discriminator *Discriminator `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"`
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
WriteOnly bool `protobuf:"varint,4,opt,name=write_only,json=writeOnly,proto3" json:"write_only,omitempty"`
Xml *Xml `protobuf:"bytes,5,opt,name=xml,proto3" json:"xml,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
Example *Any `protobuf:"bytes,7,opt,name=example,proto3" json:"example,omitempty"`
Deprecated bool `protobuf:"varint,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
Title string `protobuf:"bytes,9,opt,name=title,proto3" json:"title,omitempty"`
MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"`
MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
MaxProperties int64 `protobuf:"varint,21,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"`
MinProperties int64 `protobuf:"varint,22,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"`
Required []string `protobuf:"bytes,23,rep,name=required,proto3" json:"required,omitempty"`
Enum []*Any `protobuf:"bytes,24,rep,name=enum,proto3" json:"enum,omitempty"`
Type string `protobuf:"bytes,25,opt,name=type,proto3" json:"type,omitempty"`
AllOf []*SchemaOrReference `protobuf:"bytes,26,rep,name=all_of,json=allOf,proto3" json:"all_of,omitempty"`
OneOf []*SchemaOrReference `protobuf:"bytes,27,rep,name=one_of,json=oneOf,proto3" json:"one_of,omitempty"`
AnyOf []*SchemaOrReference `protobuf:"bytes,28,rep,name=any_of,json=anyOf,proto3" json:"any_of,omitempty"`
Not *Schema `protobuf:"bytes,29,opt,name=not,proto3" json:"not,omitempty"`
Items *ItemsItem `protobuf:"bytes,30,opt,name=items,proto3" json:"items,omitempty"`
Properties *Properties `protobuf:"bytes,31,opt,name=properties,proto3" json:"properties,omitempty"`
AdditionalProperties *AdditionalPropertiesItem `protobuf:"bytes,32,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
Default *DefaultType `protobuf:"bytes,33,opt,name=default,proto3" json:"default,omitempty"`
Description string `protobuf:"bytes,34,opt,name=description,proto3" json:"description,omitempty"`
Format string `protobuf:"bytes,35,opt,name=format,proto3" json:"format,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,36,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Schema) Reset() {
*x = Schema{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[63]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Schema) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[63]
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 Schema.ProtoReflect.Descriptor instead.
func (*Schema) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{63}
}
func (x *Schema) GetNullable() bool {
if x != nil {
return x.Nullable
}
return false
}
func (x *Schema) GetDiscriminator() *Discriminator {
if x != nil {
return x.Discriminator
}
return nil
}
func (x *Schema) GetReadOnly() bool {
if x != nil {
return x.ReadOnly
}
return false
}
func (x *Schema) GetWriteOnly() bool {
if x != nil {
return x.WriteOnly
}
return false
}
func (x *Schema) GetXml() *Xml {
if x != nil {
return x.Xml
}
return nil
}
func (x *Schema) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Schema) GetExample() *Any {
if x != nil {
return x.Example
}
return nil
}
func (x *Schema) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Schema) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Schema) GetMultipleOf() float64 {
if x != nil {
return x.MultipleOf
}
return 0
}
func (x *Schema) GetMaximum() float64 {
if x != nil {
return x.Maximum
}
return 0
}
func (x *Schema) GetExclusiveMaximum() bool {
if x != nil {
return x.ExclusiveMaximum
}
return false
}
func (x *Schema) GetMinimum() float64 {
if x != nil {
return x.Minimum
}
return 0
}
func (x *Schema) GetExclusiveMinimum() bool {
if x != nil {
return x.ExclusiveMinimum
}
return false
}
func (x *Schema) GetMaxLength() int64 {
if x != nil {
return x.MaxLength
}
return 0
}
func (x *Schema) GetMinLength() int64 {
if x != nil {
return x.MinLength
}
return 0
}
func (x *Schema) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
func (x *Schema) GetMaxItems() int64 {
if x != nil {
return x.MaxItems
}
return 0
}
func (x *Schema) GetMinItems() int64 {
if x != nil {
return x.MinItems
}
return 0
}
func (x *Schema) GetUniqueItems() bool {
if x != nil {
return x.UniqueItems
}
return false
}
func (x *Schema) GetMaxProperties() int64 {
if x != nil {
return x.MaxProperties
}
return 0
}
func (x *Schema) GetMinProperties() int64 {
if x != nil {
return x.MinProperties
}
return 0
}
func (x *Schema) GetRequired() []string {
if x != nil {
return x.Required
}
return nil
}
func (x *Schema) GetEnum() []*Any {
if x != nil {
return x.Enum
}
return nil
}
func (x *Schema) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Schema) GetAllOf() []*SchemaOrReference {
if x != nil {
return x.AllOf
}
return nil
}
func (x *Schema) GetOneOf() []*SchemaOrReference {
if x != nil {
return x.OneOf
}
return nil
}
func (x *Schema) GetAnyOf() []*SchemaOrReference {
if x != nil {
return x.AnyOf
}
return nil
}
func (x *Schema) GetNot() *Schema {
if x != nil {
return x.Not
}
return nil
}
func (x *Schema) GetItems() *ItemsItem {
if x != nil {
return x.Items
}
return nil
}
func (x *Schema) GetProperties() *Properties {
if x != nil {
return x.Properties
}
return nil
}
func (x *Schema) GetAdditionalProperties() *AdditionalPropertiesItem {
if x != nil {
return x.AdditionalProperties
}
return nil
}
func (x *Schema) GetDefault() *DefaultType {
if x != nil {
return x.Default
}
return nil
}
func (x *Schema) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Schema) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Schema) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type SchemaOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *SchemaOrReference_Schema
// *SchemaOrReference_Reference
Oneof isSchemaOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *SchemaOrReference) Reset() {
*x = SchemaOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SchemaOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SchemaOrReference) ProtoMessage() {}
func (x *SchemaOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[64]
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 SchemaOrReference.ProtoReflect.Descriptor instead.
func (*SchemaOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{64}
}
func (m *SchemaOrReference) GetOneof() isSchemaOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *SchemaOrReference) GetSchema() *Schema {
if x, ok := x.GetOneof().(*SchemaOrReference_Schema); ok {
return x.Schema
}
return nil
}
func (x *SchemaOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*SchemaOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isSchemaOrReference_Oneof interface {
isSchemaOrReference_Oneof()
}
type SchemaOrReference_Schema struct {
Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3,oneof"`
}
type SchemaOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*SchemaOrReference_Schema) isSchemaOrReference_Oneof() {}
func (*SchemaOrReference_Reference) isSchemaOrReference_Oneof() {}
type SchemasOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSchemaOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *SchemasOrReferences) Reset() {
*x = SchemasOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SchemasOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SchemasOrReferences) ProtoMessage() {}
func (x *SchemasOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[65]
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 SchemasOrReferences.ProtoReflect.Descriptor instead.
func (*SchemasOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{65}
}
func (x *SchemasOrReferences) GetAdditionalProperties() []*NamedSchemaOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.
type SecurityRequirement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *SecurityRequirement) Reset() {
*x = SecurityRequirement{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[66]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityRequirement) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityRequirement) ProtoMessage() {}
func (x *SecurityRequirement) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[66]
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 SecurityRequirement.ProtoReflect.Descriptor instead.
func (*SecurityRequirement) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{66}
}
func (x *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect. Please note that currently (2019) the implicit flow is about to be deprecated OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.
type SecurityScheme struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
In string `protobuf:"bytes,4,opt,name=in,proto3" json:"in,omitempty"`
Scheme string `protobuf:"bytes,5,opt,name=scheme,proto3" json:"scheme,omitempty"`
BearerFormat string `protobuf:"bytes,6,opt,name=bearer_format,json=bearerFormat,proto3" json:"bearer_format,omitempty"`
Flows *OauthFlows `protobuf:"bytes,7,opt,name=flows,proto3" json:"flows,omitempty"`
OpenIdConnectUrl string `protobuf:"bytes,8,opt,name=open_id_connect_url,json=openIdConnectUrl,proto3" json:"open_id_connect_url,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,9,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *SecurityScheme) Reset() {
*x = SecurityScheme{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecurityScheme) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecurityScheme) ProtoMessage() {}
func (x *SecurityScheme) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[67]
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 SecurityScheme.ProtoReflect.Descriptor instead.
func (*SecurityScheme) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{67}
}
func (x *SecurityScheme) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *SecurityScheme) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *SecurityScheme) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *SecurityScheme) GetIn() string {
if x != nil {
return x.In
}
return ""
}
func (x *SecurityScheme) GetScheme() string {
if x != nil {
return x.Scheme
}
return ""
}
func (x *SecurityScheme) GetBearerFormat() string {
if x != nil {
return x.BearerFormat
}
return ""
}
func (x *SecurityScheme) GetFlows() *OauthFlows {
if x != nil {
return x.Flows
}
return nil
}
func (x *SecurityScheme) GetOpenIdConnectUrl() string {
if x != nil {
return x.OpenIdConnectUrl
}
return ""
}
func (x *SecurityScheme) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type SecuritySchemeOrReference struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *SecuritySchemeOrReference_SecurityScheme
// *SecuritySchemeOrReference_Reference
Oneof isSecuritySchemeOrReference_Oneof `protobuf_oneof:"oneof"`
}
func (x *SecuritySchemeOrReference) Reset() {
*x = SecuritySchemeOrReference{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[68]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecuritySchemeOrReference) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecuritySchemeOrReference) ProtoMessage() {}
func (x *SecuritySchemeOrReference) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[68]
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 SecuritySchemeOrReference.ProtoReflect.Descriptor instead.
func (*SecuritySchemeOrReference) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{68}
}
func (m *SecuritySchemeOrReference) GetOneof() isSecuritySchemeOrReference_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *SecuritySchemeOrReference) GetSecurityScheme() *SecurityScheme {
if x, ok := x.GetOneof().(*SecuritySchemeOrReference_SecurityScheme); ok {
return x.SecurityScheme
}
return nil
}
func (x *SecuritySchemeOrReference) GetReference() *Reference {
if x, ok := x.GetOneof().(*SecuritySchemeOrReference_Reference); ok {
return x.Reference
}
return nil
}
type isSecuritySchemeOrReference_Oneof interface {
isSecuritySchemeOrReference_Oneof()
}
type SecuritySchemeOrReference_SecurityScheme struct {
SecurityScheme *SecurityScheme `protobuf:"bytes,1,opt,name=security_scheme,json=securityScheme,proto3,oneof"`
}
type SecuritySchemeOrReference_Reference struct {
Reference *Reference `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
func (*SecuritySchemeOrReference_SecurityScheme) isSecuritySchemeOrReference_Oneof() {}
func (*SecuritySchemeOrReference_Reference) isSecuritySchemeOrReference_Oneof() {}
type SecuritySchemesOrReferences struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedSecuritySchemeOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *SecuritySchemesOrReferences) Reset() {
*x = SecuritySchemesOrReferences{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[69]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SecuritySchemesOrReferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SecuritySchemesOrReferences) ProtoMessage() {}
func (x *SecuritySchemesOrReferences) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[69]
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 SecuritySchemesOrReferences.ProtoReflect.Descriptor instead.
func (*SecuritySchemesOrReferences) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{69}
}
func (x *SecuritySchemesOrReferences) GetAdditionalProperties() []*NamedSecuritySchemeOrReference {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// An object representing a Server.
type Server struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Variables *ServerVariables `protobuf:"bytes,3,opt,name=variables,proto3" json:"variables,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Server) Reset() {
*x = Server{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[70]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Server) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Server) ProtoMessage() {}
func (x *Server) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[70]
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 Server.ProtoReflect.Descriptor instead.
func (*Server) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{70}
}
func (x *Server) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Server) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Server) GetVariables() *ServerVariables {
if x != nil {
return x.Variables
}
return nil
}
func (x *Server) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// An object representing a Server Variable for server URL template substitution.
type ServerVariable struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Enum []string `protobuf:"bytes,1,rep,name=enum,proto3" json:"enum,omitempty"`
Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *ServerVariable) Reset() {
*x = ServerVariable{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[71]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerVariable) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerVariable) ProtoMessage() {}
func (x *ServerVariable) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[71]
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 ServerVariable.ProtoReflect.Descriptor instead.
func (*ServerVariable) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{71}
}
func (x *ServerVariable) GetEnum() []string {
if x != nil {
return x.Enum
}
return nil
}
func (x *ServerVariable) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
func (x *ServerVariable) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ServerVariable) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
type ServerVariables struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedServerVariable `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *ServerVariables) Reset() {
*x = ServerVariables{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[72]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerVariables) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerVariables) ProtoMessage() {}
func (x *ServerVariables) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[72]
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 ServerVariables.ProtoReflect.Descriptor instead.
func (*ServerVariables) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{72}
}
func (x *ServerVariables) GetAdditionalProperties() []*NamedServerVariable {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Any property starting with x- is valid.
type SpecificationExtension struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Oneof:
// *SpecificationExtension_Number
// *SpecificationExtension_Boolean
// *SpecificationExtension_String_
Oneof isSpecificationExtension_Oneof `protobuf_oneof:"oneof"`
}
func (x *SpecificationExtension) Reset() {
*x = SpecificationExtension{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[73]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpecificationExtension) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpecificationExtension) ProtoMessage() {}
func (x *SpecificationExtension) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[73]
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 SpecificationExtension.ProtoReflect.Descriptor instead.
func (*SpecificationExtension) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{73}
}
func (m *SpecificationExtension) GetOneof() isSpecificationExtension_Oneof {
if m != nil {
return m.Oneof
}
return nil
}
func (x *SpecificationExtension) GetNumber() float64 {
if x, ok := x.GetOneof().(*SpecificationExtension_Number); ok {
return x.Number
}
return 0
}
func (x *SpecificationExtension) GetBoolean() bool {
if x, ok := x.GetOneof().(*SpecificationExtension_Boolean); ok {
return x.Boolean
}
return false
}
func (x *SpecificationExtension) GetString_() string {
if x, ok := x.GetOneof().(*SpecificationExtension_String_); ok {
return x.String_
}
return ""
}
type isSpecificationExtension_Oneof interface {
isSpecificationExtension_Oneof()
}
type SpecificationExtension_Number struct {
Number float64 `protobuf:"fixed64,1,opt,name=number,proto3,oneof"`
}
type SpecificationExtension_Boolean struct {
Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"`
}
type SpecificationExtension_String_ struct {
String_ string `protobuf:"bytes,3,opt,name=string,proto3,oneof"`
}
func (*SpecificationExtension_Number) isSpecificationExtension_Oneof() {}
func (*SpecificationExtension_Boolean) isSpecificationExtension_Oneof() {}
func (*SpecificationExtension_String_) isSpecificationExtension_Oneof() {}
type StringArray struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
func (x *StringArray) Reset() {
*x = StringArray{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[74]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringArray) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringArray) ProtoMessage() {}
func (x *StringArray) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[74]
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 StringArray.ProtoReflect.Descriptor instead.
func (*StringArray) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{74}
}
func (x *StringArray) GetValue() []string {
if x != nil {
return x.Value
}
return nil
}
type Strings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
}
func (x *Strings) Reset() {
*x = Strings{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[75]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Strings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Strings) ProtoMessage() {}
func (x *Strings) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[75]
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 Strings.ProtoReflect.Descriptor instead.
func (*Strings) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{75}
}
func (x *Strings) GetAdditionalProperties() []*NamedString {
if x != nil {
return x.AdditionalProperties
}
return nil
}
// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
type Tag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[76]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[76]
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 Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{76}
}
func (x *Tag) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Tag) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Tag) GetExternalDocs() *ExternalDocs {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Tag) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.
type Xml struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
Attribute bool `protobuf:"varint,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
Wrapped bool `protobuf:"varint,5,opt,name=wrapped,proto3" json:"wrapped,omitempty"`
SpecificationExtension []*NamedAny `protobuf:"bytes,6,rep,name=specification_extension,json=specificationExtension,proto3" json:"specification_extension,omitempty"`
}
func (x *Xml) Reset() {
*x = Xml{}
if protoimpl.UnsafeEnabled {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[77]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Xml) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Xml) ProtoMessage() {}
func (x *Xml) ProtoReflect() protoreflect.Message {
mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[77]
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 Xml.ProtoReflect.Descriptor instead.
func (*Xml) Descriptor() ([]byte, []int) {
return file_openapiv3_OpenAPIv3_proto_rawDescGZIP(), []int{77}
}
func (x *Xml) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Xml) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Xml) GetPrefix() string {
if x != nil {
return x.Prefix
}
return ""
}
func (x *Xml) GetAttribute() bool {
if x != nil {
return x.Attribute
}
return false
}
func (x *Xml) GetWrapped() bool {
if x != nil {
return x.Wrapped
}
return false
}
func (x *Xml) GetSpecificationExtension() []*NamedAny {
if x != nil {
return x.SpecificationExtension
}
return nil
}
var File_openapiv3_OpenAPIv3_proto protoreflect.FileDescriptor
var file_openapiv3_OpenAPIv3_proto_rawDesc = []byte{
0x0a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x4f, 0x70, 0x65, 0x6e,
0x41, 0x50, 0x49, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x4f, 0x0a, 0x13, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x11, 0x73,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x42, 0x07, 0x0a, 0x05,
0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x45, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x2a, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x22, 0x79, 0x0a, 0x0f,
0x41, 0x6e, 0x79, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x23, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52,
0x03, 0x61, 0x6e, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x07,
0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x88, 0x01, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c,
0x62, 0x61, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4f,
0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x63, 0x61,
0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61,
0x63, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x35,
0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x72,
0x0a, 0x15, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
0x65, 0x73, 0x22, 0xac, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x73, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x73, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x3f, 0x0a, 0x09,
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x42, 0x0a,
0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x73, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12,
0x4c, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x69, 0x65,
0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x69,
0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0d,
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a,
0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52,
0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x73, 0x65, 0x63, 0x75,
0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x4f,
0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0f, 0x73, 0x65, 0x63,
0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x05,
0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x4f, 0x72,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b,
0x73, 0x12, 0x3f, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x22, 0x94, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65,
0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79,
0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x0b, 0x44, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x18, 0x0a,
0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
0x22, 0xb2, 0x01, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74,
0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69,
0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x07, 0x6d,
0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73,
0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x03, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x12, 0x24, 0x0a, 0x04,
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e,
0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
0x12, 0x27, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74,
0x68, 0x73, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
0x73, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x23,
0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74,
0x61, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f,
0x64, 0x6f, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f,
0x63, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x22, 0x8e, 0x02, 0x0a, 0x08, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21,
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
0x65, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05,
0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x79,
0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e,
0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x65, 0x72,
0x76, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12,
0x4e, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22,
0xe2, 0x01, 0x0a, 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25,
0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70,
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x48, 0x00, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x09,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x70, 0x0a, 0x14,
0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4f, 0x72, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x57,
0x0a, 0x0a, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x15,
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x4d, 0x0a, 0x17,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x04, 0x0a, 0x06,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
0x61, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6d,
0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64, 0x65,
0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76,
0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52,
0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29,
0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79,
0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65,
0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79,
0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2c,
0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x6e, 0x0a, 0x13,
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc9, 0x02, 0x0a,
0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a,
0x10, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69,
0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18,
0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x5a, 0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x4d, 0x0a, 0x13, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
0x6f, 0x72, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70,
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0xe8, 0x02, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x23, 0x0a,
0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x72,
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f,
0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x4f, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0x79, 0x0a, 0x0f, 0x4c, 0x69, 0x6e, 0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x10, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69,
0x6e, 0x6b, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x6a, 0x0a, 0x11, 0x4c, 0x69,
0x6e, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12,
0x55, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x09, 0x4d, 0x65, 0x64, 0x69, 0x61,
0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x07, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x72,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x65,
0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0a, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54,
0x79, 0x70, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52,
0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x65, 0x0a, 0x18,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4f, 0x72, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6f,
0x64, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x17, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x61, 0x0a, 0x16, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5d, 0x0a, 0x14,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x0e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65,
0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x67,
0x0a, 0x19, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65,
0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6b, 0x0a, 0x1b, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42,
0x6f, 0x64, 0x79, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x65, 0x0a, 0x18, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x61, 0x0a, 0x16,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x71, 0x0a, 0x1e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65,
0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x5b, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x37, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x55, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0xf2, 0x01, 0x0a, 0x09, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a,
0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75,
0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70,
0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x73,
0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70,
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x0a, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c,
0x6f, 0x77, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x08, 0x69, 0x6d,
0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x52,
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x6c, 0x69,
0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x11, 0x63, 0x6c,
0x69, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12,
0x44, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c,
0x6f, 0x77, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70,
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x49,
0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x96, 0x05, 0x0a, 0x09, 0x4f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52,
0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0c, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x62,
0x61, 0x63, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x09, 0x63,
0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72,
0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65,
0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75,
0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x63,
0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0xb1, 0x04, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x6e, 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, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x6d, 0x70, 0x74,
0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61,
0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73,
0x74, 0x79, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x64, 0x65, 0x12, 0x25,
0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73,
0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x07,
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07,
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f,
0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x65, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
0x35, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a,
0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x74, 0x0a, 0x16, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
0x12, 0x5a, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xfa, 0x04, 0x0a,
0x08, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65,
0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x27, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x65,
0x74, 0x12, 0x27, 0x0a, 0x03, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f,
0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x09, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64,
0x12, 0x2b, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2b, 0x0a,
0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61,
0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
0x74, 0x65, 0x72, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a,
0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70,
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e,
0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x05, 0x50, 0x61,
0x74, 0x68, 0x73, 0x12, 0x2d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x70, 0x61,
0x74, 0x68, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x22, 0x65, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12,
0x57, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d,
0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61,
0x72, 0x79, 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, 0x22, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42,
0x6f, 0x64, 0x69, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x73, 0x12, 0x5c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22,
0xcc, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12,
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x96,
0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07,
0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x9d, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
0x73, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x73, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52,
0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52,
0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e,
0x65, 0x6f, 0x66, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x73, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x15,
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73,
0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x59,
0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xaf, 0x0b, 0x0a, 0x06, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74,
0x6f, 0x72, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1d,
0x0a, 0x0a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a,
0x03, 0x78, 0x6d, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x58, 0x6d, 0x6c, 0x52, 0x03, 0x78, 0x6d, 0x6c,
0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63,
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63,
0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12,
0x29, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f,
0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76,
0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69,
0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d,
0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f,
0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12,
0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d,
0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a,
0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d,
0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d,
0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61,
0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d,
0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x16, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x17,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x23,
0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65,
0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x6c, 0x6c, 0x5f, 0x6f,
0x66, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x4f, 0x66, 0x12, 0x34, 0x0a,
0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x6f, 0x6e,
0x65, 0x4f, 0x66, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x6e, 0x79, 0x5f, 0x6f, 0x66, 0x18, 0x1c, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x52, 0x05, 0x61, 0x6e, 0x79, 0x4f, 0x66, 0x12, 0x24, 0x0a, 0x03, 0x6e, 0x6f, 0x74,
0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x12,
0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x0a,
0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
0x74, 0x69, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x20, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33,
0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65,
0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12,
0x31, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65,
0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x23,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4d, 0x0a, 0x17,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64,
0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x11,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22,
0x6e, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72,
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22,
0x68, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69,
0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72,
0x72, 0x61, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x02, 0x0a, 0x0e, 0x53, 0x65,
0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x23,
0x0a, 0x0d, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x46, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x77,
0x73, 0x12, 0x2d, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
0x6f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x55, 0x72, 0x6c,
0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0xa2, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65,
0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a,
0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65,
0x6d, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00,
0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f,
0x6e, 0x65, 0x6f, 0x66, 0x22, 0x7e, 0x0a, 0x1b, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e,
0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14,
0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72,
0x74, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x73, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x4d,
0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x01,
0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04,
0x65, 0x6e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 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, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0x67, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x73, 0x12, 0x54, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72,
0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x71, 0x0a, 0x16, 0x53, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x01, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x07,
0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52,
0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x23, 0x0a, 0x0b, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x57, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x61,
0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50,
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc9, 0x01, 0x0a, 0x03, 0x54, 0x61,
0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73,
0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65,
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x03, 0x58, 0x6d, 0x6c, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12,
0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3e,
0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33,
0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x16, 0x2e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x3b, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x4f, 0x41, 0x53, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openapiv3_OpenAPIv3_proto_rawDescOnce sync.Once
file_openapiv3_OpenAPIv3_proto_rawDescData = file_openapiv3_OpenAPIv3_proto_rawDesc
)
func file_openapiv3_OpenAPIv3_proto_rawDescGZIP() []byte {
file_openapiv3_OpenAPIv3_proto_rawDescOnce.Do(func() {
file_openapiv3_OpenAPIv3_proto_rawDescData = protoimpl.X.CompressGZIP(file_openapiv3_OpenAPIv3_proto_rawDescData)
})
return file_openapiv3_OpenAPIv3_proto_rawDescData
}
var file_openapiv3_OpenAPIv3_proto_msgTypes = make([]protoimpl.MessageInfo, 78)
var file_openapiv3_OpenAPIv3_proto_goTypes = []interface{}{
(*AdditionalPropertiesItem)(nil), // 0: openapi.v3.AdditionalPropertiesItem
(*Any)(nil), // 1: openapi.v3.Any
(*AnyOrExpression)(nil), // 2: openapi.v3.AnyOrExpression
(*Callback)(nil), // 3: openapi.v3.Callback
(*CallbackOrReference)(nil), // 4: openapi.v3.CallbackOrReference
(*CallbacksOrReferences)(nil), // 5: openapi.v3.CallbacksOrReferences
(*Components)(nil), // 6: openapi.v3.Components
(*Contact)(nil), // 7: openapi.v3.Contact
(*DefaultType)(nil), // 8: openapi.v3.DefaultType
(*Discriminator)(nil), // 9: openapi.v3.Discriminator
(*Document)(nil), // 10: openapi.v3.Document
(*Encoding)(nil), // 11: openapi.v3.Encoding
(*Encodings)(nil), // 12: openapi.v3.Encodings
(*Example)(nil), // 13: openapi.v3.Example
(*ExampleOrReference)(nil), // 14: openapi.v3.ExampleOrReference
(*ExamplesOrReferences)(nil), // 15: openapi.v3.ExamplesOrReferences
(*Expression)(nil), // 16: openapi.v3.Expression
(*ExternalDocs)(nil), // 17: openapi.v3.ExternalDocs
(*Header)(nil), // 18: openapi.v3.Header
(*HeaderOrReference)(nil), // 19: openapi.v3.HeaderOrReference
(*HeadersOrReferences)(nil), // 20: openapi.v3.HeadersOrReferences
(*Info)(nil), // 21: openapi.v3.Info
(*ItemsItem)(nil), // 22: openapi.v3.ItemsItem
(*License)(nil), // 23: openapi.v3.License
(*Link)(nil), // 24: openapi.v3.Link
(*LinkOrReference)(nil), // 25: openapi.v3.LinkOrReference
(*LinksOrReferences)(nil), // 26: openapi.v3.LinksOrReferences
(*MediaType)(nil), // 27: openapi.v3.MediaType
(*MediaTypes)(nil), // 28: openapi.v3.MediaTypes
(*NamedAny)(nil), // 29: openapi.v3.NamedAny
(*NamedCallbackOrReference)(nil), // 30: openapi.v3.NamedCallbackOrReference
(*NamedEncoding)(nil), // 31: openapi.v3.NamedEncoding
(*NamedExampleOrReference)(nil), // 32: openapi.v3.NamedExampleOrReference
(*NamedHeaderOrReference)(nil), // 33: openapi.v3.NamedHeaderOrReference
(*NamedLinkOrReference)(nil), // 34: openapi.v3.NamedLinkOrReference
(*NamedMediaType)(nil), // 35: openapi.v3.NamedMediaType
(*NamedParameterOrReference)(nil), // 36: openapi.v3.NamedParameterOrReference
(*NamedPathItem)(nil), // 37: openapi.v3.NamedPathItem
(*NamedRequestBodyOrReference)(nil), // 38: openapi.v3.NamedRequestBodyOrReference
(*NamedResponseOrReference)(nil), // 39: openapi.v3.NamedResponseOrReference
(*NamedSchemaOrReference)(nil), // 40: openapi.v3.NamedSchemaOrReference
(*NamedSecuritySchemeOrReference)(nil), // 41: openapi.v3.NamedSecuritySchemeOrReference
(*NamedServerVariable)(nil), // 42: openapi.v3.NamedServerVariable
(*NamedString)(nil), // 43: openapi.v3.NamedString
(*NamedStringArray)(nil), // 44: openapi.v3.NamedStringArray
(*OauthFlow)(nil), // 45: openapi.v3.OauthFlow
(*OauthFlows)(nil), // 46: openapi.v3.OauthFlows
(*Object)(nil), // 47: openapi.v3.Object
(*Operation)(nil), // 48: openapi.v3.Operation
(*Parameter)(nil), // 49: openapi.v3.Parameter
(*ParameterOrReference)(nil), // 50: openapi.v3.ParameterOrReference
(*ParametersOrReferences)(nil), // 51: openapi.v3.ParametersOrReferences
(*PathItem)(nil), // 52: openapi.v3.PathItem
(*Paths)(nil), // 53: openapi.v3.Paths
(*Properties)(nil), // 54: openapi.v3.Properties
(*Reference)(nil), // 55: openapi.v3.Reference
(*RequestBodiesOrReferences)(nil), // 56: openapi.v3.RequestBodiesOrReferences
(*RequestBody)(nil), // 57: openapi.v3.RequestBody
(*RequestBodyOrReference)(nil), // 58: openapi.v3.RequestBodyOrReference
(*Response)(nil), // 59: openapi.v3.Response
(*ResponseOrReference)(nil), // 60: openapi.v3.ResponseOrReference
(*Responses)(nil), // 61: openapi.v3.Responses
(*ResponsesOrReferences)(nil), // 62: openapi.v3.ResponsesOrReferences
(*Schema)(nil), // 63: openapi.v3.Schema
(*SchemaOrReference)(nil), // 64: openapi.v3.SchemaOrReference
(*SchemasOrReferences)(nil), // 65: openapi.v3.SchemasOrReferences
(*SecurityRequirement)(nil), // 66: openapi.v3.SecurityRequirement
(*SecurityScheme)(nil), // 67: openapi.v3.SecurityScheme
(*SecuritySchemeOrReference)(nil), // 68: openapi.v3.SecuritySchemeOrReference
(*SecuritySchemesOrReferences)(nil), // 69: openapi.v3.SecuritySchemesOrReferences
(*Server)(nil), // 70: openapi.v3.Server
(*ServerVariable)(nil), // 71: openapi.v3.ServerVariable
(*ServerVariables)(nil), // 72: openapi.v3.ServerVariables
(*SpecificationExtension)(nil), // 73: openapi.v3.SpecificationExtension
(*StringArray)(nil), // 74: openapi.v3.StringArray
(*Strings)(nil), // 75: openapi.v3.Strings
(*Tag)(nil), // 76: openapi.v3.Tag
(*Xml)(nil), // 77: openapi.v3.Xml
(*anypb.Any)(nil), // 78: google.protobuf.Any
}
var file_openapiv3_OpenAPIv3_proto_depIdxs = []int32{
64, // 0: openapi.v3.AdditionalPropertiesItem.schema_or_reference:type_name -> openapi.v3.SchemaOrReference
78, // 1: openapi.v3.Any.value:type_name -> google.protobuf.Any
1, // 2: openapi.v3.AnyOrExpression.any:type_name -> openapi.v3.Any
16, // 3: openapi.v3.AnyOrExpression.expression:type_name -> openapi.v3.Expression
37, // 4: openapi.v3.Callback.path:type_name -> openapi.v3.NamedPathItem
29, // 5: openapi.v3.Callback.specification_extension:type_name -> openapi.v3.NamedAny
3, // 6: openapi.v3.CallbackOrReference.callback:type_name -> openapi.v3.Callback
55, // 7: openapi.v3.CallbackOrReference.reference:type_name -> openapi.v3.Reference
30, // 8: openapi.v3.CallbacksOrReferences.additional_properties:type_name -> openapi.v3.NamedCallbackOrReference
65, // 9: openapi.v3.Components.schemas:type_name -> openapi.v3.SchemasOrReferences
62, // 10: openapi.v3.Components.responses:type_name -> openapi.v3.ResponsesOrReferences
51, // 11: openapi.v3.Components.parameters:type_name -> openapi.v3.ParametersOrReferences
15, // 12: openapi.v3.Components.examples:type_name -> openapi.v3.ExamplesOrReferences
56, // 13: openapi.v3.Components.request_bodies:type_name -> openapi.v3.RequestBodiesOrReferences
20, // 14: openapi.v3.Components.headers:type_name -> openapi.v3.HeadersOrReferences
69, // 15: openapi.v3.Components.security_schemes:type_name -> openapi.v3.SecuritySchemesOrReferences
26, // 16: openapi.v3.Components.links:type_name -> openapi.v3.LinksOrReferences
5, // 17: openapi.v3.Components.callbacks:type_name -> openapi.v3.CallbacksOrReferences
29, // 18: openapi.v3.Components.specification_extension:type_name -> openapi.v3.NamedAny
29, // 19: openapi.v3.Contact.specification_extension:type_name -> openapi.v3.NamedAny
75, // 20: openapi.v3.Discriminator.mapping:type_name -> openapi.v3.Strings
29, // 21: openapi.v3.Discriminator.specification_extension:type_name -> openapi.v3.NamedAny
21, // 22: openapi.v3.Document.info:type_name -> openapi.v3.Info
70, // 23: openapi.v3.Document.servers:type_name -> openapi.v3.Server
53, // 24: openapi.v3.Document.paths:type_name -> openapi.v3.Paths
6, // 25: openapi.v3.Document.components:type_name -> openapi.v3.Components
66, // 26: openapi.v3.Document.security:type_name -> openapi.v3.SecurityRequirement
76, // 27: openapi.v3.Document.tags:type_name -> openapi.v3.Tag
17, // 28: openapi.v3.Document.external_docs:type_name -> openapi.v3.ExternalDocs
29, // 29: openapi.v3.Document.specification_extension:type_name -> openapi.v3.NamedAny
20, // 30: openapi.v3.Encoding.headers:type_name -> openapi.v3.HeadersOrReferences
29, // 31: openapi.v3.Encoding.specification_extension:type_name -> openapi.v3.NamedAny
31, // 32: openapi.v3.Encodings.additional_properties:type_name -> openapi.v3.NamedEncoding
1, // 33: openapi.v3.Example.value:type_name -> openapi.v3.Any
29, // 34: openapi.v3.Example.specification_extension:type_name -> openapi.v3.NamedAny
13, // 35: openapi.v3.ExampleOrReference.example:type_name -> openapi.v3.Example
55, // 36: openapi.v3.ExampleOrReference.reference:type_name -> openapi.v3.Reference
32, // 37: openapi.v3.ExamplesOrReferences.additional_properties:type_name -> openapi.v3.NamedExampleOrReference
29, // 38: openapi.v3.Expression.additional_properties:type_name -> openapi.v3.NamedAny
29, // 39: openapi.v3.ExternalDocs.specification_extension:type_name -> openapi.v3.NamedAny
64, // 40: openapi.v3.Header.schema:type_name -> openapi.v3.SchemaOrReference
1, // 41: openapi.v3.Header.example:type_name -> openapi.v3.Any
15, // 42: openapi.v3.Header.examples:type_name -> openapi.v3.ExamplesOrReferences
28, // 43: openapi.v3.Header.content:type_name -> openapi.v3.MediaTypes
29, // 44: openapi.v3.Header.specification_extension:type_name -> openapi.v3.NamedAny
18, // 45: openapi.v3.HeaderOrReference.header:type_name -> openapi.v3.Header
55, // 46: openapi.v3.HeaderOrReference.reference:type_name -> openapi.v3.Reference
33, // 47: openapi.v3.HeadersOrReferences.additional_properties:type_name -> openapi.v3.NamedHeaderOrReference
7, // 48: openapi.v3.Info.contact:type_name -> openapi.v3.Contact
23, // 49: openapi.v3.Info.license:type_name -> openapi.v3.License
29, // 50: openapi.v3.Info.specification_extension:type_name -> openapi.v3.NamedAny
64, // 51: openapi.v3.ItemsItem.schema_or_reference:type_name -> openapi.v3.SchemaOrReference
29, // 52: openapi.v3.License.specification_extension:type_name -> openapi.v3.NamedAny
2, // 53: openapi.v3.Link.parameters:type_name -> openapi.v3.AnyOrExpression
2, // 54: openapi.v3.Link.request_body:type_name -> openapi.v3.AnyOrExpression
70, // 55: openapi.v3.Link.server:type_name -> openapi.v3.Server
29, // 56: openapi.v3.Link.specification_extension:type_name -> openapi.v3.NamedAny
24, // 57: openapi.v3.LinkOrReference.link:type_name -> openapi.v3.Link
55, // 58: openapi.v3.LinkOrReference.reference:type_name -> openapi.v3.Reference
34, // 59: openapi.v3.LinksOrReferences.additional_properties:type_name -> openapi.v3.NamedLinkOrReference
64, // 60: openapi.v3.MediaType.schema:type_name -> openapi.v3.SchemaOrReference
1, // 61: openapi.v3.MediaType.example:type_name -> openapi.v3.Any
15, // 62: openapi.v3.MediaType.examples:type_name -> openapi.v3.ExamplesOrReferences
12, // 63: openapi.v3.MediaType.encoding:type_name -> openapi.v3.Encodings
29, // 64: openapi.v3.MediaType.specification_extension:type_name -> openapi.v3.NamedAny
35, // 65: openapi.v3.MediaTypes.additional_properties:type_name -> openapi.v3.NamedMediaType
1, // 66: openapi.v3.NamedAny.value:type_name -> openapi.v3.Any
4, // 67: openapi.v3.NamedCallbackOrReference.value:type_name -> openapi.v3.CallbackOrReference
11, // 68: openapi.v3.NamedEncoding.value:type_name -> openapi.v3.Encoding
14, // 69: openapi.v3.NamedExampleOrReference.value:type_name -> openapi.v3.ExampleOrReference
19, // 70: openapi.v3.NamedHeaderOrReference.value:type_name -> openapi.v3.HeaderOrReference
25, // 71: openapi.v3.NamedLinkOrReference.value:type_name -> openapi.v3.LinkOrReference
27, // 72: openapi.v3.NamedMediaType.value:type_name -> openapi.v3.MediaType
50, // 73: openapi.v3.NamedParameterOrReference.value:type_name -> openapi.v3.ParameterOrReference
52, // 74: openapi.v3.NamedPathItem.value:type_name -> openapi.v3.PathItem
58, // 75: openapi.v3.NamedRequestBodyOrReference.value:type_name -> openapi.v3.RequestBodyOrReference
60, // 76: openapi.v3.NamedResponseOrReference.value:type_name -> openapi.v3.ResponseOrReference
64, // 77: openapi.v3.NamedSchemaOrReference.value:type_name -> openapi.v3.SchemaOrReference
68, // 78: openapi.v3.NamedSecuritySchemeOrReference.value:type_name -> openapi.v3.SecuritySchemeOrReference
71, // 79: openapi.v3.NamedServerVariable.value:type_name -> openapi.v3.ServerVariable
74, // 80: openapi.v3.NamedStringArray.value:type_name -> openapi.v3.StringArray
75, // 81: openapi.v3.OauthFlow.scopes:type_name -> openapi.v3.Strings
29, // 82: openapi.v3.OauthFlow.specification_extension:type_name -> openapi.v3.NamedAny
45, // 83: openapi.v3.OauthFlows.implicit:type_name -> openapi.v3.OauthFlow
45, // 84: openapi.v3.OauthFlows.password:type_name -> openapi.v3.OauthFlow
45, // 85: openapi.v3.OauthFlows.client_credentials:type_name -> openapi.v3.OauthFlow
45, // 86: openapi.v3.OauthFlows.authorization_code:type_name -> openapi.v3.OauthFlow
29, // 87: openapi.v3.OauthFlows.specification_extension:type_name -> openapi.v3.NamedAny
29, // 88: openapi.v3.Object.additional_properties:type_name -> openapi.v3.NamedAny
17, // 89: openapi.v3.Operation.external_docs:type_name -> openapi.v3.ExternalDocs
50, // 90: openapi.v3.Operation.parameters:type_name -> openapi.v3.ParameterOrReference
58, // 91: openapi.v3.Operation.request_body:type_name -> openapi.v3.RequestBodyOrReference
61, // 92: openapi.v3.Operation.responses:type_name -> openapi.v3.Responses
5, // 93: openapi.v3.Operation.callbacks:type_name -> openapi.v3.CallbacksOrReferences
66, // 94: openapi.v3.Operation.security:type_name -> openapi.v3.SecurityRequirement
70, // 95: openapi.v3.Operation.servers:type_name -> openapi.v3.Server
29, // 96: openapi.v3.Operation.specification_extension:type_name -> openapi.v3.NamedAny
64, // 97: openapi.v3.Parameter.schema:type_name -> openapi.v3.SchemaOrReference
1, // 98: openapi.v3.Parameter.example:type_name -> openapi.v3.Any
15, // 99: openapi.v3.Parameter.examples:type_name -> openapi.v3.ExamplesOrReferences
28, // 100: openapi.v3.Parameter.content:type_name -> openapi.v3.MediaTypes
29, // 101: openapi.v3.Parameter.specification_extension:type_name -> openapi.v3.NamedAny
49, // 102: openapi.v3.ParameterOrReference.parameter:type_name -> openapi.v3.Parameter
55, // 103: openapi.v3.ParameterOrReference.reference:type_name -> openapi.v3.Reference
36, // 104: openapi.v3.ParametersOrReferences.additional_properties:type_name -> openapi.v3.NamedParameterOrReference
48, // 105: openapi.v3.PathItem.get:type_name -> openapi.v3.Operation
48, // 106: openapi.v3.PathItem.put:type_name -> openapi.v3.Operation
48, // 107: openapi.v3.PathItem.post:type_name -> openapi.v3.Operation
48, // 108: openapi.v3.PathItem.delete:type_name -> openapi.v3.Operation
48, // 109: openapi.v3.PathItem.options:type_name -> openapi.v3.Operation
48, // 110: openapi.v3.PathItem.head:type_name -> openapi.v3.Operation
48, // 111: openapi.v3.PathItem.patch:type_name -> openapi.v3.Operation
48, // 112: openapi.v3.PathItem.trace:type_name -> openapi.v3.Operation
70, // 113: openapi.v3.PathItem.servers:type_name -> openapi.v3.Server
50, // 114: openapi.v3.PathItem.parameters:type_name -> openapi.v3.ParameterOrReference
29, // 115: openapi.v3.PathItem.specification_extension:type_name -> openapi.v3.NamedAny
37, // 116: openapi.v3.Paths.path:type_name -> openapi.v3.NamedPathItem
29, // 117: openapi.v3.Paths.specification_extension:type_name -> openapi.v3.NamedAny
40, // 118: openapi.v3.Properties.additional_properties:type_name -> openapi.v3.NamedSchemaOrReference
38, // 119: openapi.v3.RequestBodiesOrReferences.additional_properties:type_name -> openapi.v3.NamedRequestBodyOrReference
28, // 120: openapi.v3.RequestBody.content:type_name -> openapi.v3.MediaTypes
29, // 121: openapi.v3.RequestBody.specification_extension:type_name -> openapi.v3.NamedAny
57, // 122: openapi.v3.RequestBodyOrReference.request_body:type_name -> openapi.v3.RequestBody
55, // 123: openapi.v3.RequestBodyOrReference.reference:type_name -> openapi.v3.Reference
20, // 124: openapi.v3.Response.headers:type_name -> openapi.v3.HeadersOrReferences
28, // 125: openapi.v3.Response.content:type_name -> openapi.v3.MediaTypes
26, // 126: openapi.v3.Response.links:type_name -> openapi.v3.LinksOrReferences
29, // 127: openapi.v3.Response.specification_extension:type_name -> openapi.v3.NamedAny
59, // 128: openapi.v3.ResponseOrReference.response:type_name -> openapi.v3.Response
55, // 129: openapi.v3.ResponseOrReference.reference:type_name -> openapi.v3.Reference
60, // 130: openapi.v3.Responses.default:type_name -> openapi.v3.ResponseOrReference
39, // 131: openapi.v3.Responses.response_or_reference:type_name -> openapi.v3.NamedResponseOrReference
29, // 132: openapi.v3.Responses.specification_extension:type_name -> openapi.v3.NamedAny
39, // 133: openapi.v3.ResponsesOrReferences.additional_properties:type_name -> openapi.v3.NamedResponseOrReference
9, // 134: openapi.v3.Schema.discriminator:type_name -> openapi.v3.Discriminator
77, // 135: openapi.v3.Schema.xml:type_name -> openapi.v3.Xml
17, // 136: openapi.v3.Schema.external_docs:type_name -> openapi.v3.ExternalDocs
1, // 137: openapi.v3.Schema.example:type_name -> openapi.v3.Any
1, // 138: openapi.v3.Schema.enum:type_name -> openapi.v3.Any
64, // 139: openapi.v3.Schema.all_of:type_name -> openapi.v3.SchemaOrReference
64, // 140: openapi.v3.Schema.one_of:type_name -> openapi.v3.SchemaOrReference
64, // 141: openapi.v3.Schema.any_of:type_name -> openapi.v3.SchemaOrReference
63, // 142: openapi.v3.Schema.not:type_name -> openapi.v3.Schema
22, // 143: openapi.v3.Schema.items:type_name -> openapi.v3.ItemsItem
54, // 144: openapi.v3.Schema.properties:type_name -> openapi.v3.Properties
0, // 145: openapi.v3.Schema.additional_properties:type_name -> openapi.v3.AdditionalPropertiesItem
8, // 146: openapi.v3.Schema.default:type_name -> openapi.v3.DefaultType
29, // 147: openapi.v3.Schema.specification_extension:type_name -> openapi.v3.NamedAny
63, // 148: openapi.v3.SchemaOrReference.schema:type_name -> openapi.v3.Schema
55, // 149: openapi.v3.SchemaOrReference.reference:type_name -> openapi.v3.Reference
40, // 150: openapi.v3.SchemasOrReferences.additional_properties:type_name -> openapi.v3.NamedSchemaOrReference
44, // 151: openapi.v3.SecurityRequirement.additional_properties:type_name -> openapi.v3.NamedStringArray
46, // 152: openapi.v3.SecurityScheme.flows:type_name -> openapi.v3.OauthFlows
29, // 153: openapi.v3.SecurityScheme.specification_extension:type_name -> openapi.v3.NamedAny
67, // 154: openapi.v3.SecuritySchemeOrReference.security_scheme:type_name -> openapi.v3.SecurityScheme
55, // 155: openapi.v3.SecuritySchemeOrReference.reference:type_name -> openapi.v3.Reference
41, // 156: openapi.v3.SecuritySchemesOrReferences.additional_properties:type_name -> openapi.v3.NamedSecuritySchemeOrReference
72, // 157: openapi.v3.Server.variables:type_name -> openapi.v3.ServerVariables
29, // 158: openapi.v3.Server.specification_extension:type_name -> openapi.v3.NamedAny
29, // 159: openapi.v3.ServerVariable.specification_extension:type_name -> openapi.v3.NamedAny
42, // 160: openapi.v3.ServerVariables.additional_properties:type_name -> openapi.v3.NamedServerVariable
43, // 161: openapi.v3.Strings.additional_properties:type_name -> openapi.v3.NamedString
17, // 162: openapi.v3.Tag.external_docs:type_name -> openapi.v3.ExternalDocs
29, // 163: openapi.v3.Tag.specification_extension:type_name -> openapi.v3.NamedAny
29, // 164: openapi.v3.Xml.specification_extension:type_name -> openapi.v3.NamedAny
165, // [165:165] is the sub-list for method output_type
165, // [165:165] is the sub-list for method input_type
165, // [165:165] is the sub-list for extension type_name
165, // [165:165] is the sub-list for extension extendee
0, // [0:165] is the sub-list for field type_name
}
func init() { file_openapiv3_OpenAPIv3_proto_init() }
func file_openapiv3_OpenAPIv3_proto_init() {
if File_openapiv3_OpenAPIv3_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_openapiv3_OpenAPIv3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AdditionalPropertiesItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Any); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AnyOrExpression); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Callback); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallbackOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CallbacksOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Components); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Contact); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DefaultType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Discriminator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Document); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Encoding); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Encodings); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Example); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExampleOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExamplesOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Expression); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExternalDocs); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Header); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeaderOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeadersOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Info); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ItemsItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*License); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Link); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinkOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LinksOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MediaTypes); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedAny); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedCallbackOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedEncoding); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedExampleOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedHeaderOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedLinkOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedMediaType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedParameterOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedPathItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedRequestBodyOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedResponseOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedSchemaOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedSecuritySchemeOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedServerVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedString); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NamedStringArray); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OauthFlow); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OauthFlows); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Object); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Operation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Parameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ParameterOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ParametersOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PathItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Paths); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Properties); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Reference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestBodiesOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestBody); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestBodyOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Responses); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponsesOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Schema); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SchemaOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SchemasOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityRequirement); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityScheme); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecuritySchemeOrReference); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecuritySchemesOrReferences); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerVariable); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerVariables); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpecificationExtension); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StringArray); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Strings); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Tag); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Xml); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_openapiv3_OpenAPIv3_proto_msgTypes[0].OneofWrappers = []interface{}{
(*AdditionalPropertiesItem_SchemaOrReference)(nil),
(*AdditionalPropertiesItem_Boolean)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[2].OneofWrappers = []interface{}{
(*AnyOrExpression_Any)(nil),
(*AnyOrExpression_Expression)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[4].OneofWrappers = []interface{}{
(*CallbackOrReference_Callback)(nil),
(*CallbackOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[8].OneofWrappers = []interface{}{
(*DefaultType_Number)(nil),
(*DefaultType_Boolean)(nil),
(*DefaultType_String_)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[14].OneofWrappers = []interface{}{
(*ExampleOrReference_Example)(nil),
(*ExampleOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[19].OneofWrappers = []interface{}{
(*HeaderOrReference_Header)(nil),
(*HeaderOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[25].OneofWrappers = []interface{}{
(*LinkOrReference_Link)(nil),
(*LinkOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[50].OneofWrappers = []interface{}{
(*ParameterOrReference_Parameter)(nil),
(*ParameterOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[58].OneofWrappers = []interface{}{
(*RequestBodyOrReference_RequestBody)(nil),
(*RequestBodyOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[60].OneofWrappers = []interface{}{
(*ResponseOrReference_Response)(nil),
(*ResponseOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[64].OneofWrappers = []interface{}{
(*SchemaOrReference_Schema)(nil),
(*SchemaOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[68].OneofWrappers = []interface{}{
(*SecuritySchemeOrReference_SecurityScheme)(nil),
(*SecuritySchemeOrReference_Reference)(nil),
}
file_openapiv3_OpenAPIv3_proto_msgTypes[73].OneofWrappers = []interface{}{
(*SpecificationExtension_Number)(nil),
(*SpecificationExtension_Boolean)(nil),
(*SpecificationExtension_String_)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_openapiv3_OpenAPIv3_proto_rawDesc,
NumEnums: 0,
NumMessages: 78,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openapiv3_OpenAPIv3_proto_goTypes,
DependencyIndexes: file_openapiv3_OpenAPIv3_proto_depIdxs,
MessageInfos: file_openapiv3_OpenAPIv3_proto_msgTypes,
}.Build()
File_openapiv3_OpenAPIv3_proto = out.File
file_openapiv3_OpenAPIv3_proto_rawDesc = nil
file_openapiv3_OpenAPIv3_proto_goTypes = nil
file_openapiv3_OpenAPIv3_proto_depIdxs = nil
}
gnostic-models-0.6.8/openapiv3/OpenAPIv3.proto 0000664 0000000 0000000 00000053052 14225377162 0021167 0 ustar 00root root 0000000 0000000 // 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.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package openapi.v3;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "org.openapi_v3";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
// The Go package name.
option go_package = "./openapiv3;openapi_v3";
message AdditionalPropertiesItem {
oneof oneof {
SchemaOrReference schema_or_reference = 1;
bool boolean = 2;
}
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message AnyOrExpression {
oneof oneof {
Any any = 1;
Expression expression = 2;
}
}
// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
message Callback {
repeated NamedPathItem path = 1;
repeated NamedAny specification_extension = 2;
}
message CallbackOrReference {
oneof oneof {
Callback callback = 1;
Reference reference = 2;
}
}
message CallbacksOrReferences {
repeated NamedCallbackOrReference additional_properties = 1;
}
// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
message Components {
SchemasOrReferences schemas = 1;
ResponsesOrReferences responses = 2;
ParametersOrReferences parameters = 3;
ExamplesOrReferences examples = 4;
RequestBodiesOrReferences request_bodies = 5;
HeadersOrReferences headers = 6;
SecuritySchemesOrReferences security_schemes = 7;
LinksOrReferences links = 8;
CallbacksOrReferences callbacks = 9;
repeated NamedAny specification_extension = 10;
}
// Contact information for the exposed API.
message Contact {
string name = 1;
string url = 2;
string email = 3;
repeated NamedAny specification_extension = 4;
}
message DefaultType {
oneof oneof {
double number = 1;
bool boolean = 2;
string string = 3;
}
}
// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered.
message Discriminator {
string property_name = 1;
Strings mapping = 2;
repeated NamedAny specification_extension = 3;
}
message Document {
string openapi = 1;
Info info = 2;
repeated Server servers = 3;
Paths paths = 4;
Components components = 5;
repeated SecurityRequirement security = 6;
repeated Tag tags = 7;
ExternalDocs external_docs = 8;
repeated NamedAny specification_extension = 9;
}
// A single encoding definition applied to a single schema property.
message Encoding {
string content_type = 1;
HeadersOrReferences headers = 2;
string style = 3;
bool explode = 4;
bool allow_reserved = 5;
repeated NamedAny specification_extension = 6;
}
message Encodings {
repeated NamedEncoding additional_properties = 1;
}
message Example {
string summary = 1;
string description = 2;
Any value = 3;
string external_value = 4;
repeated NamedAny specification_extension = 5;
}
message ExampleOrReference {
oneof oneof {
Example example = 1;
Reference reference = 2;
}
}
message ExamplesOrReferences {
repeated NamedExampleOrReference additional_properties = 1;
}
message Expression {
repeated NamedAny additional_properties = 1;
}
// Allows referencing an external resource for extended documentation.
message ExternalDocs {
string description = 1;
string url = 2;
repeated NamedAny specification_extension = 3;
}
// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`).
message Header {
string description = 1;
bool required = 2;
bool deprecated = 3;
bool allow_empty_value = 4;
string style = 5;
bool explode = 6;
bool allow_reserved = 7;
SchemaOrReference schema = 8;
Any example = 9;
ExamplesOrReferences examples = 10;
MediaTypes content = 11;
repeated NamedAny specification_extension = 12;
}
message HeaderOrReference {
oneof oneof {
Header header = 1;
Reference reference = 2;
}
}
message HeadersOrReferences {
repeated NamedHeaderOrReference additional_properties = 1;
}
// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
message Info {
string title = 1;
string description = 2;
string terms_of_service = 3;
Contact contact = 4;
License license = 5;
string version = 6;
repeated NamedAny specification_extension = 7;
string summary = 8;
}
message ItemsItem {
repeated SchemaOrReference schema_or_reference = 1;
}
// License information for the exposed API.
message License {
string name = 1;
string url = 2;
repeated NamedAny specification_extension = 3;
}
// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
message Link {
string operation_ref = 1;
string operation_id = 2;
AnyOrExpression parameters = 3;
AnyOrExpression request_body = 4;
string description = 5;
Server server = 6;
repeated NamedAny specification_extension = 7;
}
message LinkOrReference {
oneof oneof {
Link link = 1;
Reference reference = 2;
}
}
message LinksOrReferences {
repeated NamedLinkOrReference additional_properties = 1;
}
// Each Media Type Object provides schema and examples for the media type identified by its key.
message MediaType {
SchemaOrReference schema = 1;
Any example = 2;
ExamplesOrReferences examples = 3;
Encodings encoding = 4;
repeated NamedAny specification_extension = 5;
}
message MediaTypes {
repeated NamedMediaType additional_properties = 1;
}
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
message NamedAny {
// Map key
string name = 1;
// Mapped value
Any value = 2;
}
// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs.
message NamedCallbackOrReference {
// Map key
string name = 1;
// Mapped value
CallbackOrReference value = 2;
}
// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs.
message NamedEncoding {
// Map key
string name = 1;
// Mapped value
Encoding value = 2;
}
// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs.
message NamedExampleOrReference {
// Map key
string name = 1;
// Mapped value
ExampleOrReference value = 2;
}
// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs.
message NamedHeaderOrReference {
// Map key
string name = 1;
// Mapped value
HeaderOrReference value = 2;
}
// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs.
message NamedLinkOrReference {
// Map key
string name = 1;
// Mapped value
LinkOrReference value = 2;
}
// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs.
message NamedMediaType {
// Map key
string name = 1;
// Mapped value
MediaType value = 2;
}
// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs.
message NamedParameterOrReference {
// Map key
string name = 1;
// Mapped value
ParameterOrReference value = 2;
}
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
message NamedPathItem {
// Map key
string name = 1;
// Mapped value
PathItem value = 2;
}
// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs.
message NamedRequestBodyOrReference {
// Map key
string name = 1;
// Mapped value
RequestBodyOrReference value = 2;
}
// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs.
message NamedResponseOrReference {
// Map key
string name = 1;
// Mapped value
ResponseOrReference value = 2;
}
// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs.
message NamedSchemaOrReference {
// Map key
string name = 1;
// Mapped value
SchemaOrReference value = 2;
}
// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs.
message NamedSecuritySchemeOrReference {
// Map key
string name = 1;
// Mapped value
SecuritySchemeOrReference value = 2;
}
// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs.
message NamedServerVariable {
// Map key
string name = 1;
// Mapped value
ServerVariable value = 2;
}
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
message NamedString {
// Map key
string name = 1;
// Mapped value
string value = 2;
}
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
message NamedStringArray {
// Map key
string name = 1;
// Mapped value
StringArray value = 2;
}
// Configuration details for a supported OAuth Flow
message OauthFlow {
string authorization_url = 1;
string token_url = 2;
string refresh_url = 3;
Strings scopes = 4;
repeated NamedAny specification_extension = 5;
}
// Allows configuration of the supported OAuth Flows.
message OauthFlows {
OauthFlow implicit = 1;
OauthFlow password = 2;
OauthFlow client_credentials = 3;
OauthFlow authorization_code = 4;
repeated NamedAny specification_extension = 5;
}
message Object {
repeated NamedAny additional_properties = 1;
}
// Describes a single API operation on a path.
message Operation {
repeated string tags = 1;
string summary = 2;
string description = 3;
ExternalDocs external_docs = 4;
string operation_id = 5;
repeated ParameterOrReference parameters = 6;
RequestBodyOrReference request_body = 7;
Responses responses = 8;
CallbacksOrReferences callbacks = 9;
bool deprecated = 10;
repeated SecurityRequirement security = 11;
repeated Server servers = 12;
repeated NamedAny specification_extension = 13;
}
// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.
message Parameter {
string name = 1;
string in = 2;
string description = 3;
bool required = 4;
bool deprecated = 5;
bool allow_empty_value = 6;
string style = 7;
bool explode = 8;
bool allow_reserved = 9;
SchemaOrReference schema = 10;
Any example = 11;
ExamplesOrReferences examples = 12;
MediaTypes content = 13;
repeated NamedAny specification_extension = 14;
}
message ParameterOrReference {
oneof oneof {
Parameter parameter = 1;
Reference reference = 2;
}
}
message ParametersOrReferences {
repeated NamedParameterOrReference additional_properties = 1;
}
// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
message PathItem {
string _ref = 1;
string summary = 2;
string description = 3;
Operation get = 4;
Operation put = 5;
Operation post = 6;
Operation delete = 7;
Operation options = 8;
Operation head = 9;
Operation patch = 10;
Operation trace = 11;
repeated Server servers = 12;
repeated ParameterOrReference parameters = 13;
repeated NamedAny specification_extension = 14;
}
// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.
message Paths {
repeated NamedPathItem path = 1;
repeated NamedAny specification_extension = 2;
}
message Properties {
repeated NamedSchemaOrReference additional_properties = 1;
}
// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.
message Reference {
string _ref = 1;
string summary = 2;
string description = 3;
}
message RequestBodiesOrReferences {
repeated NamedRequestBodyOrReference additional_properties = 1;
}
// Describes a single request body.
message RequestBody {
string description = 1;
MediaTypes content = 2;
bool required = 3;
repeated NamedAny specification_extension = 4;
}
message RequestBodyOrReference {
oneof oneof {
RequestBody request_body = 1;
Reference reference = 2;
}
}
// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.
message Response {
string description = 1;
HeadersOrReferences headers = 2;
MediaTypes content = 3;
LinksOrReferences links = 4;
repeated NamedAny specification_extension = 5;
}
message ResponseOrReference {
oneof oneof {
Response response = 1;
Reference reference = 2;
}
}
// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.
message Responses {
ResponseOrReference default = 1;
repeated NamedResponseOrReference response_or_reference = 2;
repeated NamedAny specification_extension = 3;
}
message ResponsesOrReferences {
repeated NamedResponseOrReference additional_properties = 1;
}
// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.
message Schema {
bool nullable = 1;
Discriminator discriminator = 2;
bool read_only = 3;
bool write_only = 4;
Xml xml = 5;
ExternalDocs external_docs = 6;
Any example = 7;
bool deprecated = 8;
string title = 9;
double multiple_of = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
int64 max_length = 15;
int64 min_length = 16;
string pattern = 17;
int64 max_items = 18;
int64 min_items = 19;
bool unique_items = 20;
int64 max_properties = 21;
int64 min_properties = 22;
repeated string required = 23;
repeated Any enum = 24;
string type = 25;
repeated SchemaOrReference all_of = 26;
repeated SchemaOrReference one_of = 27;
repeated SchemaOrReference any_of = 28;
Schema not = 29;
ItemsItem items = 30;
Properties properties = 31;
AdditionalPropertiesItem additional_properties = 32;
DefaultType default = 33;
string description = 34;
string format = 35;
repeated NamedAny specification_extension = 36;
}
message SchemaOrReference {
oneof oneof {
Schema schema = 1;
Reference reference = 2;
}
}
message SchemasOrReferences {
repeated NamedSchemaOrReference additional_properties = 1;
}
// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.
message SecurityRequirement {
repeated NamedStringArray additional_properties = 1;
}
// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect. Please note that currently (2019) the implicit flow is about to be deprecated OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.
message SecurityScheme {
string type = 1;
string description = 2;
string name = 3;
string in = 4;
string scheme = 5;
string bearer_format = 6;
OauthFlows flows = 7;
string open_id_connect_url = 8;
repeated NamedAny specification_extension = 9;
}
message SecuritySchemeOrReference {
oneof oneof {
SecurityScheme security_scheme = 1;
Reference reference = 2;
}
}
message SecuritySchemesOrReferences {
repeated NamedSecuritySchemeOrReference additional_properties = 1;
}
// An object representing a Server.
message Server {
string url = 1;
string description = 2;
ServerVariables variables = 3;
repeated NamedAny specification_extension = 4;
}
// An object representing a Server Variable for server URL template substitution.
message ServerVariable {
repeated string enum = 1;
string default = 2;
string description = 3;
repeated NamedAny specification_extension = 4;
}
message ServerVariables {
repeated NamedServerVariable additional_properties = 1;
}
// Any property starting with x- is valid.
message SpecificationExtension {
oneof oneof {
double number = 1;
bool boolean = 2;
string string = 3;
}
}
message StringArray {
repeated string value = 1;
}
message Strings {
repeated NamedString additional_properties = 1;
}
// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
message Tag {
string name = 1;
string description = 2;
ExternalDocs external_docs = 3;
repeated NamedAny specification_extension = 4;
}
// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.
message Xml {
string name = 1;
string namespace = 2;
string prefix = 3;
bool attribute = 4;
bool wrapped = 5;
repeated NamedAny specification_extension = 6;
}
gnostic-models-0.6.8/openapiv3/README.md 0000664 0000000 0000000 00000001672 14225377162 0017656 0 ustar 00root root 0000000 0000000 # OpenAPI v3 Protocol Buffer Models
This directory contains a Protocol Buffer-language model and related code for
supporting OpenAPI v3.
Gnostic applications and plugins can use OpenAPIv3.proto to generate Protocol
Buffer support code for their preferred languages.
OpenAPIv3.go is used by Gnostic to read JSON and YAML OpenAPI descriptions into
the Protocol Buffer-based datastructures generated from OpenAPIv3.proto.
OpenAPIv3.proto and OpenAPIv3.go are generated by the Gnostic compiler
generator, and OpenAPIv3.pb.go is generated by protoc, the Protocol Buffer
compiler, and protoc-gen-go, the Protocol Buffer Go code generation plugin.
openapi-3.1.json is a JSON schema for OpenAPI 3.1 that is automatically
generated from the OpenAPI 3.1 specification. It is not an official JSON Schema
for OpenAPI.
The schema-generator directory contains support code which generates
openapi-3.1.json from the OpenAPI 3.1 specification document (Markdown).
gnostic-models-0.6.8/openapiv3/document.go 0000664 0000000 0000000 00000002512 14225377162 0020536 0 ustar 00root root 0000000 0000000 // 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.
package openapi_v3
import (
"gopkg.in/yaml.v3"
"github.com/google/gnostic-models/compiler"
)
// ParseDocument reads an OpenAPI v3 description from a YAML/JSON representation.
func ParseDocument(b []byte) (*Document, error) {
info, err := compiler.ReadInfoFromBytes("", b)
if err != nil {
return nil, err
}
root := info.Content[0]
return NewDocument(root, compiler.NewContextWithExtensions("$root", root, nil, nil))
}
// YAMLValue produces a serialized YAML representation of the document.
func (d *Document) YAMLValue(comment string) ([]byte, error) {
rawInfo := d.ToRawInfo()
rawInfo = &yaml.Node{
Kind: yaml.DocumentNode,
Content: []*yaml.Node{rawInfo},
HeadComment: comment,
}
return yaml.Marshal(rawInfo)
}