// ToRawInfo returns a description of Document suitable for JSON or YAML export.
426187
func (m *Document) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "swagger", Value: m.Swagger})
	// 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 m.Host != "" {
		info = append(info, yaml.MapItem{Key: "host", Value: m.Host})
	}
	if m.BasePath != "" {
		info = append(info, yaml.MapItem{Key: "basePath", Value: m.BasePath})
	}
	if len(m.Schemes) != 0 {
		info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes})
	}
	if len(m.Consumes) != 0 {
		info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes})
	}
	if len(m.Produces) != 0 {
		info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces})
	}
	// 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.Definitions != nil {
		info = append(info, yaml.MapItem{Key: "definitions", Value: m.Definitions.ToRawInfo()})
	}
	// &{Name:definitions Type:Definitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Parameters != nil {
		info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()})
	}
	// &{Name:parameters Type:ParameterDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Responses != nil {
		info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()})
	}
	// &{Name:responses Type:ResponseDefinitions 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 m.SecurityDefinitions != nil {
		info = append(info, yaml.MapItem{Key: "securityDefinitions", Value: m.SecurityDefinitions.ToRawInfo()})
	}
	// &{Name:securityDefinitions Type:SecurityDefinitions StringEnumValues:[] MapType: Repeated:false 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.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
}
876938
func (m *Annotations) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if len(m.Required) != 0 {
		info = append(info, yaml.MapItem{Key: "required", Value: m.Required})
	}
	return info
}
49407
func (m *TypeItem) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if len(m.Value) != 0 {
		info = append(info, yaml.MapItem{Key: "value", Value: m.Value})
	}
	return info
}
1077931
func (m *SecuritySchemeOrReference) ToRawInfo() interface{} {
	// 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 nil
}
1171872
func (m *Schema) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Nullable != false {
		info = append(info, yaml.MapItem{Key: "nullable", Value: m.Nullable})
	}
	if m.Discriminator != nil {
		info = append(info, yaml.MapItem{Key: "discriminator", Value: m.Discriminator.ToRawInfo()})
	}
	// &{Name:discriminator Type:Discriminator StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.ReadOnly != false {
		info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly})
	}
	if m.WriteOnly != false {
		info = append(info, yaml.MapItem{Key: "writeOnly", Value: m.WriteOnly})
	}
	if m.Xml != nil {
		info = append(info, yaml.MapItem{Key: "xml", Value: m.Xml.ToRawInfo()})
	}
	// &{Name:xml Type:Xml StringEnumValues:[] MapType: Repeated:false 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.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.Deprecated != false {
		info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated})
	}
	if m.Title != "" {
		info = append(info, yaml.MapItem{Key: "title", Value: m.Title})
	}
	if m.MultipleOf != 0.0 {
		info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf})
	}
	if m.Maximum != 0.0 {
		info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum})
	}
	if m.ExclusiveMaximum != false {
		info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum})
	}
	if m.Minimum != 0.0 {
		info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum})
	}
	if m.ExclusiveMinimum != false {
		info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum})
	}
	if m.MaxLength != 0 {
		info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength})
	}
	if m.MinLength != 0 {
		info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength})
	}
	if m.Pattern != "" {
		info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern})
	}
	if m.MaxItems != 0 {
		info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems})
	}
	if m.MinItems != 0 {
		info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems})
	}
	if m.UniqueItems != false {
		info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems})
	}
	if m.MaxProperties != 0 {
		info = append(info, yaml.MapItem{Key: "maxProperties", Value: m.MaxProperties})
	}
	if m.MinProperties != 0 {
		info = append(info, yaml.MapItem{Key: "minProperties", Value: m.MinProperties})
	}
	if len(m.Required) != 0 {
		info = append(info, yaml.MapItem{Key: "required", Value: m.Required})
	}
	if len(m.Enum) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.Enum {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "enum", Value: items})
	}
	// &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if m.Type != "" {
		info = append(info, yaml.MapItem{Key: "type", Value: m.Type})
	}
	if len(m.AllOf) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.AllOf {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "allOf", Value: items})
	}
	// &{Name:allOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if len(m.OneOf) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.OneOf {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "oneOf", Value: items})
	}
	// &{Name:oneOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if len(m.AnyOf) != 0 {
		items := make([]interface{}, 0)
		for _, item := range m.AnyOf {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "anyOf", Value: items})
	}
	// &{Name:anyOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:}
	if m.Not != nil {
		info = append(info, yaml.MapItem{Key: "not", Value: m.Not.ToRawInfo()})
	}
	// &{Name:not Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Items != nil {
		items := make([]interface{}, 0)
		for _, item := range m.Items.SchemaOrReference {
			items = append(items, item.ToRawInfo())
		}
		info = append(info, yaml.MapItem{Key: "items", Value: items[0]})
	}
	// &{Name:items Type:ItemsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Properties != nil {
		info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()})
	}
	// &{Name:properties Type:Properties StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.AdditionalProperties != nil {
		info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()})
	}
	// &{Name:additionalProperties Type:AdditionalPropertiesItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Default != nil {
		info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()})
	}
	// &{Name:default Type:DefaultType StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.Format != "" {
		info = append(info, yaml.MapItem{Key: "format", Value: m.Format})
	}
	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
}
911697
func (m *Xml) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Name != "" {
		info = append(info, yaml.MapItem{Key: "name", Value: m.Name})
	}
	if m.Namespace != "" {
		info = append(info, yaml.MapItem{Key: "namespace", Value: m.Namespace})
	}
	if m.Prefix != "" {
		info = append(info, yaml.MapItem{Key: "prefix", Value: m.Prefix})
	}
	if m.Attribute != false {
		info = append(info, yaml.MapItem{Key: "attribute", Value: m.Attribute})
	}
	if m.Wrapped != false {
		info = append(info, yaml.MapItem{Key: "wrapped", Value: m.Wrapped})
	}
	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
}
402297
func (m *Link) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.OperationRef != "" {
		info = append(info, yaml.MapItem{Key: "operationRef", Value: m.OperationRef})
	}
	if m.OperationId != "" {
		info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId})
	}
	if m.Parameters != nil {
		info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()})
	}
	// &{Name:parameters Type:AnysOrExpressions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.RequestBody != nil {
		info = append(info, yaml.MapItem{Key: "requestBody", Value: m.RequestBody.ToRawInfo()})
	}
	// &{Name:requestBody Type:AnyOrExpression StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.Description})
	}
	if m.Server != nil {
		info = append(info, yaml.MapItem{Key: "server", Value: m.Server.ToRawInfo()})
	}
	// &{Name:server Type:Server 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
}
935643
func (m *SchemaItem) ToRawInfo() interface{} {
	// 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 nil
}
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
}
647479
func (nd *Node) RequestInfo(policy *InfoPolicy, name ...string) (map[string]string, error) {
	return nd.requestInfo(policy.Timeout, name...)
}
18921
func (trc *TumblrRestClient) BlogInfo(blogname string) BlogInfoResponse {
	requestUrl := fmt.Sprintf("/v2/blog/%s/info", blogname)
	options := map[string]string{"api_key": trc.request.apiKey}
	data := trc.request.Get(requestUrl, options)
	var result BlogInfoResponse
	json.Unmarshal(data.Response, &result)
	return result
}
1140698
func EntryInfoFromFileInfo(fi os.FileInfo) EntryInfo {
	t := File
	if fi.IsDir() {
		t = Dir
	} else if fi.Mode()&os.ModeSymlink != 0 {
		t = Sym
	} else if fi.Mode()&0100 != 0 {
		t = Exec
	}
	mtime := fi.ModTime().UnixNano()
	return EntryInfo{
		Type:  t,
		Size:  uint64(fi.Size()), // TODO: deal with negatives?
		Mtime: mtime,
		Ctime: mtime,
		// Leave TeamWriter and PrevRevisions empty
	}
}
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
}
1165701
func (m *DefaultType) ToRawInfo() interface{} {
	// 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 v0.Number
	}
	// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if v1, ok := m.GetOneof().(*DefaultType_Boolean); ok {
		return v1.Boolean
	}
	// {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if v2, ok := m.GetOneof().(*DefaultType_String_); ok {
		return v2.String_
	}
	return nil
}
751254
func (m *Reference) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef})
	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
}
351380
func (c *Controller) ProtocolInfo() ([]string, string, string, error) {
	// We'll start off by sending the "PROTOCOLINFO" command to the Tor
	// server. We should receive a reply of the following format:
	//
	//	METHODS=COOKIE,SAFECOOKIE
	//	COOKIEFILE="/home/user/.tor/control_auth_cookie"
	//	VERSION Tor="0.3.2.10"
	//
	// We're interested in retrieving all of these fields, so we'll parse
	// our reply to do so.
	cmd := fmt.Sprintf("PROTOCOLINFO %d", ProtocolInfoVersion)
	_, reply, err := c.sendCommand(cmd)
	if err != nil {
		return nil, "", "", err
	}

	info := parseTorReply(reply)
	methods, ok := info["METHODS"]
	if !ok {
		return nil, "", "", errors.New("auth methods not found in " +
			"reply")
	}

	cookieFile, ok := info["COOKIEFILE"]
	if !ok && !strings.Contains(methods, "NULL") {
		return nil, "", "", errors.New("cookie file path not found " +
			"in reply")
	}

	version, ok := info["Tor"]
	if !ok {
		return nil, "", "", errors.New("Tor version not found in reply")
	}

	// Finally, we'll clean up the results before returning them.
	authMethods := strings.Split(methods, ",")
	cookieFilePath := strings.Trim(cookieFile, "\"")
	torVersion := strings.Trim(version, "\"")

	return authMethods, cookieFilePath, torVersion, nil
}