// ToRawInfo returns a description of ParameterOrReference suitable for JSON or YAML export.
13843
func (m *ParameterOrReference) ToRawInfo() interface{} {
	// 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 nil
}
349793
func (m *Document) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Kind != "" {
		info = append(info, yaml.MapItem{Key: "kind", Value: m.Kind})
	}
	if m.DiscoveryVersion != "" {
		info = append(info, yaml.MapItem{Key: "discoveryVersion", Value: m.DiscoveryVersion})
	}
	if m.Id != "" {
		info = append(info, yaml.MapItem{Key: "id", Value: m.Id})
	}
	if m.Name != "" {
		info = append(info, yaml.MapItem{Key: "name", Value: m.Name})
	}
	if m.Version != "" {
		info = append(info, yaml.MapItem{Key: "version", Value: m.Version})
	}
	if m.Revision != "" {
		info = append(info, yaml.MapItem{Key: "revision", Value: m.Revision})
	}
	if m.Title != "" {
		info = append(info, yaml.MapItem{Key: "title", Value: m.Title})
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.Icons != nil {
		info = append(info, yaml.MapItem{Key: "icons", Value: m.Icons.ToRawInfo()})
	}
	// &{Name:icons Type:Icons StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.DocumentationLink != "" {
		info = append(info, yaml.MapItem{Key: "documentationLink", Value: m.DocumentationLink})
	}
	if len(m.Labels) != 0 {
		info = append(info, yaml.MapItem{Key: "labels", Value: m.Labels})
	}
	if m.Protocol != "" {
		info = append(info, yaml.MapItem{Key: "protocol", Value: m.Protocol})
	}
	if m.BaseUrl != "" {
		info = append(info, yaml.MapItem{Key: "baseUrl", Value: m.BaseUrl})
	}
	if m.BasePath != "" {
		info = append(info, yaml.MapItem{Key: "basePath", Value: m.BasePath})
	}
	if m.RootUrl != "" {
		info = append(info, yaml.MapItem{Key: "rootUrl", Value: m.RootUrl})
	}
	if m.ServicePath != "" {
		info = append(info, yaml.MapItem{Key: "servicePath", Value: m.ServicePath})
	}
	if m.BatchPath != "" {
		info = append(info, yaml.MapItem{Key: "batchPath", Value: m.BatchPath})
	}
	if m.Parameters != nil {
		info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()})
	}
	// &{Name:parameters Type:Parameters StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Auth != nil {
		info = append(info, yaml.MapItem{Key: "auth", Value: m.Auth.ToRawInfo()})
	}
	// &{Name:auth Type:Auth StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.Features) != 0 {
		info = append(info, yaml.MapItem{Key: "features", Value: m.Features})
	}
	if m.Schemas != nil {
		info = append(info, yaml.MapItem{Key: "schemas", Value: m.Schemas.ToRawInfo()})
	}
	// &{Name:schemas Type:Schemas StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Methods != nil {
		info = append(info, yaml.MapItem{Key: "methods", Value: m.Methods.ToRawInfo()})
	}
	// &{Name:methods Type:Methods StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Resources != nil {
		info = append(info, yaml.MapItem{Key: "resources", Value: m.Resources.ToRawInfo()})
	}
	// &{Name:resources Type:Resources StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Etag != "" {
		info = append(info, yaml.MapItem{Key: "etag", Value: m.Etag})
	}
	if m.OwnerDomain != "" {
		info = append(info, yaml.MapItem{Key: "ownerDomain", Value: m.OwnerDomain})
	}
	if m.OwnerName != "" {
		info = append(info, yaml.MapItem{Key: "ownerName", Value: m.OwnerName})
	}
	if m.VersionModule != false {
		info = append(info, yaml.MapItem{Key: "version_module", Value: m.VersionModule})
	}
	if m.CanonicalName != "" {
		info = append(info, yaml.MapItem{Key: "canonicalName", Value: m.CanonicalName})
	}
	if m.FullyEncodeReservedExpansion != false {
		info = append(info, yaml.MapItem{Key: "fullyEncodeReservedExpansion", Value: m.FullyEncodeReservedExpansion})
	}
	if m.PackagePath != "" {
		info = append(info, yaml.MapItem{Key: "packagePath", Value: m.PackagePath})
	}
	return info
}
557553
func (m *ItemsItem) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if len(m.Schema) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Schema {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "schema", Value: items})
	}
	// &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	return info
}
511345
func (m *Auth) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Oauth2 != nil {
		info = append(info, yaml.MapItem{Key: "oauth2", Value: m.Oauth2.ToRawInfo()})
	}
	// &{Name:oauth2 Type:Oauth2 StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	return info
}
1282150
func (m *Icons) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.X16 != "" {
		info = append(info, yaml.MapItem{Key: "x16", Value: m.X16})
	}
	if m.X32 != "" {
		info = append(info, yaml.MapItem{Key: "x32", Value: m.X32})
	}
	return info
}
1333619
func (m *Response) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	if m.Headers != nil {
		info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()})
	}
	// &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Content != nil {
		info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()})
	}
	// &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Links != nil {
		info = append(info, yaml.MapItem{Key: "links", Value: m.Links.ToRawInfo()})
	}
	// &{Name:links Type:LinksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
637731
func (m *Document) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "openapi", Value: m.Openapi})
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()})
	// &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.Servers) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Servers {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "servers", Value: items})
	}
	// &{Name:servers Type:Server StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()})
	// &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Components != nil {
		info = append(info, yaml.MapItem{Key: "components", Value: m.Components.ToRawInfo()})
	}
	// &{Name:components Type:Components StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if len(m.Security) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Security {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "security", Value: items})
	}
	// &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if len(m.Tags) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Tags {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "tags", Value: items})
	}
	// &{Name:tags Type:Tag StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if m.ExternalDocs != nil {
		info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()})
	}
	// &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
584187
func (m *BodyParameter) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "name", Value: m.Name})
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "in", Value: m.In})
	if m.Required != false {
		info = append(info, yaml.MapItem{Key: "required", Value: m.Required})
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()})
	// &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.VendorExtension != nil {
		for _, item := range m.VendorExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
827647
func (m *NamedMethod) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Name != "" {
		info = append(info, yaml.MapItem{Key: "name", Value: m.Name})
	}
	// &{Name:value Type:Method StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value}
	return info
}
526981
func (e *RequestError) UnmarshalInfo(to interface{}) error {
	if reflect.ValueOf(to).Kind() != reflect.Ptr {
		return errors.New("UnmarshalInfo expects a pointer as an argument")
	}

	data, err := json.Marshal(e.Info)
	if err != nil {
		return errors.Annotate(err, "could not marshal error information")
	}
	err = json.Unmarshal(data, to)
	if err != nil {
		return errors.Annotate(err, "could not unmarshal error information to provided target")
	}

	return nil
}
381784
func (m *Responses) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.ResponseCode != nil {
		for _, item := range m.ResponseCode {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:ResponseCode Type:NamedResponseValue StringEnumValues:[] MapType:ResponseValue Repeated:true Pattern:^([0-9]{3})$|^(default)$ Implicit:true Description:}
	if m.VendorExtension != nil {
		for _, item := range m.VendorExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
459031
func (m *Header) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.Required != false {
		info = append(info, yaml.MapItem{Key: "required", Value: m.Required})
	}
	if m.Deprecated != false {
		info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated})
	}
	if m.AllowEmptyValue != false {
		info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue})
	}
	if m.Style != "" {
		info = append(info, yaml.MapItem{Key: "style", Value: m.Style})
	}
	if m.Explode != false {
		info = append(info, yaml.MapItem{Key: "explode", Value: m.Explode})
	}
	if m.AllowReserved != false {
		info = append(info, yaml.MapItem{Key: "allowReserved", Value: m.AllowReserved})
	}
	if m.Schema != nil {
		info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()})
	}
	// &{Name:schema Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Example != nil {
		info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()})
	}
	// &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Examples != nil {
		info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()})
	}
	// &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Content != nil {
		info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()})
	}
	// &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
1006843
func (m *Scope) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	return info
}
514297
func (m *Resource) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Methods != nil {
		info = append(info, yaml.MapItem{Key: "methods", Value: m.Methods.ToRawInfo()})
	}
	// &{Name:methods Type:Methods StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Resources != nil {
		info = append(info, yaml.MapItem{Key: "resources", Value: m.Resources.ToRawInfo()})
	}
	// &{Name:resources Type:Resources StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	return info
}
387827
func (m *Callback) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Path != nil {
		for _, item := range m.Path {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^ Implicit:true Description:}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
465813
func (m *Example) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Summary != "" {
		info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary})
	}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	// &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.ExternalValue != "" {
		info = append(info, yaml.MapItem{Key: "externalValue", Value: m.ExternalValue})
	}
	if m.SpecificationExtension != nil {
		for _, item := range m.SpecificationExtension {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:}
	return info
}
959694
func (m *AnyOrExpression) ToRawInfo() interface{} {
	// 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 nil
}