// ToRawInfo returns a description of Auth suitable for JSON or YAML export.
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
}
259014
func toRawObject(
	bucketName string,
	in *CreateObjectRequest) (out *storagev1.Object, err error) {
	out = &storagev1.Object{
		Bucket:          bucketName,
		Name:            in.Name,
		ContentType:     in.ContentType,
		ContentLanguage: in.ContentLanguage,
		ContentEncoding: in.ContentEncoding,
		CacheControl:    in.CacheControl,
		Metadata:        in.Metadata,
	}

	if in.CRC32C != nil {
		buf := []byte{
			byte(*in.CRC32C >> 24),
			byte(*in.CRC32C >> 16),
			byte(*in.CRC32C >> 8),
			byte(*in.CRC32C >> 0),
		}

		out.Crc32c = base64.StdEncoding.EncodeToString(buf)
	}

	if in.MD5 != nil {
		out.Md5Hash = base64.StdEncoding.EncodeToString(in.MD5[:])
	}

	return
}
1220062
func (api *SystemAPI) GetAuthInfo() (info *AuthInfo, err error) {
	res, err := api.client.restClient.Get(api.getEndpointUrl("auth"), nil)
	if err != nil {
		return
	}
	defer res.Body.Close()
	res, err = getError(res)
	if err != nil {
		return
	}
	info = &AuthInfo{}
	err = json.NewDecoder(res.Body).Decode(info)
	return
}
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
}
283551
func URLInfo(theURL string, tor bool) (info Item, ok bool) {
	options := Options{
		Query: "url:" + theURL,
		Count: 1,
		Tor:   tor,
	}
	results, ok := WebSearch(options)
	if !ok {
		return
	}

	if len(results) > 0 {
		info = results[0]
		return
	}
	return
}
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
}
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
}
1368658
func (m *SpecificationExtension) ToRawInfo() interface{} {
	// 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 v0.Number
	}
	// {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if v1, ok := m.GetOneof().(*SpecificationExtension_Boolean); ok {
		return v1.Boolean
	}
	// {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if v2, ok := m.GetOneof().(*SpecificationExtension_String_); ok {
		return v2.String_
	}
	return nil
}
5377
func (m *SecurityDefinitionsItem) ToRawInfo() interface{} {
	// 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 nil
}
858855
func requestAWSInfo(url string) (metadata *EC2Metadata, err error) {
	metadata = &EC2Metadata{}
	httpClient := &http.Client{Timeout: 200 * time.Millisecond}

	// make the request
	var res *http.Response
	if res, err = httpClient.Get(url); err == nil {
		err = json.NewDecoder(res.Body).Decode(metadata)
		_ = res.Body.Close()
	}

	return metadata, err
}
83463
func (nd *Node) requestRawInfo(policy *InfoPolicy, name ...string) (*info, error) {
	nd.tendConnLock.Lock()
	defer nd.tendConnLock.Unlock()

	if err := nd.initTendConn(policy.Timeout); err != nil {
		return nil, err
	}

	response, err := newInfo(nd.tendConn, name...)
	if err != nil {
		nd.tendConn.Close()
		return nil, err
	}
	return response, nil
}
753753
func (m *Responses) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Default != nil {
		info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()})
	}
	// &{Name:default Type:ResponseOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.ResponseOrReference != nil {
		for _, item := range m.ResponseOrReference {
			info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()})
		}
	}
	// &{Name:ResponseOrReference Type:NamedResponseOrReference StringEnumValues:[] MapType:ResponseOrReference Repeated:true Pattern:^([0-9X]{3})$ 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
}
778394
func (m *MediaType) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	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.Encoding != nil {
		info = append(info, yaml.MapItem{Key: "encoding", Value: m.Encoding.ToRawInfo()})
	}
	// &{Name:encoding Type:Encodings 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
}
461849
func (m *NonBodyParameter) ToRawInfo() interface{} {
	// 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 nil
}
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
}
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
}
1219287
func (m *RequestBodyOrReference) ToRawInfo() interface{} {
	// 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 nil
}