// ToRawInfo returns a description of Response suitable for JSON or YAML export.
427278
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.Schema != nil {
		info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()})
	}
	// &{Name:schema Type:SchemaItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Headers != nil {
		info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()})
	}
	// &{Name:headers Type:Headers 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:Examples 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
}
89726
func (s *server) handleInfo(w http.ResponseWriter, r *http.Request) {
	json.NewEncoder(w).Encode(s.network.LocalPeer())
}
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
}
129364
func APIInfo(ctx context.ProviderCallContext, controllerUUID, modelUUID, caCert string, apiPort int, env Environ) (*api.Info, error) {
	instanceIds, err := env.ControllerInstances(ctx, controllerUUID)
	if err != nil {
		return nil, err
	}
	logger.Debugf("ControllerInstances returned: %v", instanceIds)
	addrs, err := waitAnyInstanceAddresses(env, ctx, instanceIds)
	if err != nil {
		return nil, err
	}
	apiAddrs := network.HostPortsToStrings(
		network.AddressesWithPort(addrs, apiPort),
	)
	modelTag := names.NewModelTag(modelUUID)
	apiInfo := &api.Info{Addrs: apiAddrs, CACert: caCert, ModelTag: modelTag}
	return apiInfo, nil
}
652293
func (m *OauthFlows) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	if m.Implicit != nil {
		info = append(info, yaml.MapItem{Key: "implicit", Value: m.Implicit.ToRawInfo()})
	}
	// &{Name:implicit Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.Password != nil {
		info = append(info, yaml.MapItem{Key: "password", Value: m.Password.ToRawInfo()})
	}
	// &{Name:password Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.ClientCredentials != nil {
		info = append(info, yaml.MapItem{Key: "clientCredentials", Value: m.ClientCredentials.ToRawInfo()})
	}
	// &{Name:clientCredentials Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	if m.AuthorizationCode != nil {
		info = append(info, yaml.MapItem{Key: "authorizationCode", Value: m.AuthorizationCode.ToRawInfo()})
	}
	// &{Name:authorizationCode Type:OauthFlow 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
}
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
}
526238
func (c *modelAgentConfig) APIInfo() (*api.Info, bool) {
	info, ok := c.Config.APIInfo()
	if !ok {
		return nil, false
	}
	info.ModelTag = names.NewModelTag(c.modelUUID)
	return info, true
}
972311
func (client *Client) GetInfo() (Info, ResourceLinks, Warnings, error) {
	rootResponse, warnings, err := client.rootResponse()
	if err != nil {
		return Info{}, ResourceLinks{}, warnings, err
	}

	request, err := client.newHTTPRequest(requestOptions{
		Method: http.MethodGet,
		URL:    rootResponse.ccV3Link(),
	})
	if err != nil {
		return Info{}, ResourceLinks{}, warnings, err
	}

	info := ResourceLinks{} // Explicitly initializing
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &info,
	}

	err = client.connection.Make(request, &response)
	warnings = append(warnings, response.Warnings...)

	if err != nil {
		return Info{}, ResourceLinks{}, warnings, err
	}

	return rootResponse, info, warnings, nil
}
1006843
func (m *Scope) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.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
}
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
}
216449
func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeName string) {
	code.Print("// ToRawInfo returns a description of %s suitable for JSON or YAML export.", typeName)
	code.Print("func (m *%s) ToRawInfo() interface{} {", typeName)
	typeModel := domain.TypeModels[typeName]
	if typeName == "Any" {
		code.Print("var err error")
		code.Print("var info1 []yaml.MapSlice")
		code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info1)")
		code.Print("if err == nil {return info1}")
		code.Print("var info2 yaml.MapSlice")
		code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info2)")
		code.Print("if err == nil {return info2}")
		code.Print("var info3 interface{}")
		code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info3)")
		code.Print("if err == nil {return info3}")
		code.Print("return nil")
	} else if typeName == "StringArray" {
		code.Print("return m.Value")
	} else if typeModel.OneOfWrapper {
		code.Print("// ONE OF WRAPPER")
		code.Print("// %s", typeModel.Name)
		for i, item := range typeModel.Properties {
			code.Print("// %+v", *item)
			if item.Type == "float" {
				code.Print("if v%d, ok := m.GetOneof().(*%s_Number); ok {", i, typeName)
				code.Print("return v%d.Number", i)
				code.Print("}")
			} else if item.Type == "bool" {
				code.Print("if v%d, ok := m.GetOneof().(*%s_Boolean); ok {", i, typeName)
				code.Print("return v%d.Boolean", i)
				code.Print("}")
			} else if item.Type == "string" {
				code.Print("if v%d, ok := m.GetOneof().(*%s_String_); ok {", i, typeName)
				code.Print("return v%d.String_", i)
				code.Print("}")
			} else {
				code.Print("v%d := m.Get%s()", i, item.Type)
				code.Print("if v%d != nil {", i)
				code.Print(" return v%d.ToRawInfo()", i)
				code.Print("}")
			}
		}
		code.Print("return nil")
	} else {
		code.Print("info := yaml.MapSlice{}")
		code.Print("if m == nil {return info}")
		for _, propertyModel := range typeModel.Properties {
			isRequired := typeModel.IsRequired(propertyModel.Name)
			switch propertyModel.Type {
			case "string":
				propertyName := propertyModel.Name
				if !propertyModel.Repeated {
					code.PrintIf(isRequired, "// always include this required field.")
					code.PrintIf(!isRequired, "if m.%s != \"\" {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.PrintIf(!isRequired, "}")
				} else {
					code.Print("if len(m.%s) != 0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.Print("}")
				}
			case "bool":
				propertyName := propertyModel.Name
				if !propertyModel.Repeated {
					code.PrintIf(isRequired, "// always include this required field.")
					code.PrintIf(!isRequired, "if m.%s != false {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.PrintIf(!isRequired, "}")
				} else {
					code.Print("if len(m.%s) != 0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.Print("}")
				}
			case "int":
				propertyName := propertyModel.Name
				if !propertyModel.Repeated {
					code.PrintIf(isRequired, "// always include this required field.")
					code.PrintIf(!isRequired, "if m.%s != 0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.PrintIf(!isRequired, "}")
				} else {
					code.Print("if len(m.%s) != 0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.Print("}")
				}
			case "float":
				propertyName := propertyModel.Name
				if !propertyModel.Repeated {
					code.PrintIf(isRequired, "// always include this required field.")
					code.PrintIf(!isRequired, "if m.%s != 0.0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.PrintIf(!isRequired, "}")
				} else {
					code.Print("if len(m.%s) != 0 {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName())
					code.Print("}")
				}
			default:
				propertyName := propertyModel.Name
				if propertyName == "value" {
					code.Print("// %+v", propertyModel)
				} else if !propertyModel.Repeated {
					code.PrintIf(isRequired, "// always include this required field.")
					code.PrintIf(!isRequired, "if m.%s != nil {", propertyModel.FieldName())
					if propertyModel.Type == "TypeItem" {
						code.Print("if len(m.Type.Value) == 1 {")
						code.Print("info = append(info, yaml.MapItem{Key:\"type\", Value:m.Type.Value[0]})")
						code.Print("} else {")
						code.Print("info = append(info, yaml.MapItem{Key:\"type\", Value:m.Type.Value})")
						code.Print("}")
					} else if propertyModel.Type == "ItemsItem" {
						code.Print("items := make([]interface{}, 0)")
						if domain.Version == "v2" {
							code.Print("for _, item := range m.Items.Schema {")
						} else {
							code.Print("for _, item := range m.Items.SchemaOrReference {")
						}
						code.Print("	items = append(items, item.ToRawInfo())")
						code.Print("}")
						code.Print("info = append(info, yaml.MapItem{Key:\"items\", Value:items[0]})")
					} else {
						code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s.ToRawInfo()})",
							propertyName, propertyModel.FieldName())
					}
					code.PrintIf(!isRequired, "}")
					code.Print("// %+v", propertyModel)
				} else if propertyModel.MapType == "string" {
					code.Print("// %+v", propertyModel)
				} else if propertyModel.MapType != "" {
					code.Print("if m.%s != nil {", propertyModel.FieldName())
					code.Print("for _, item := range m.%s {", propertyModel.FieldName())
					code.Print("info = append(info, yaml.MapItem{Key:item.Name, Value:item.Value.ToRawInfo()})")
					code.Print("}")
					code.Print("}")
					code.Print("// %+v", propertyModel)
				} else {
					code.Print("if len(m.%s) != 0 {", propertyModel.FieldName())
					code.Print("items := make([]interface{}, 0)")
					code.Print("for _, item := range m.%s {", propertyModel.FieldName())
					code.Print("items = append(items, item.ToRawInfo())")
					code.Print("}")
					code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:items})", propertyName)
					code.Print("}")
					code.Print("// %+v", propertyModel)
				}
			}
		}
		code.Print("return info")
	}
	code.Print("}\n")
}
1094756
func (m *ResponseOrReference) ToRawInfo() interface{} {
	// 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 nil
}
1304914
func (client *Client) Info() (APIInformation, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetInfoRequest,
	})
	if err != nil {
		return APIInformation{}, nil, err
	}

	var info APIInformation
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &info,
	}

	err = client.connection.Make(request, &response)
	if unknownSourceErr, ok := err.(ccerror.UnknownHTTPSourceError); ok && unknownSourceErr.StatusCode == http.StatusNotFound {
		return APIInformation{}, nil, ccerror.APINotFoundError{URL: client.cloudControllerURL}
	}
	return info, response.Warnings, err
}
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
}
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
}
172120
func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} {
	info := yaml.MapSlice{}
	if m == nil {
		return info
	}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "type", Value: m.Type})
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow})
	if m.Scopes != nil {
		info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()})
	}
	// &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:}
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl})
	// always include this required field.
	info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl})
	if m.Description != "" {
		info = append(info, yaml.MapItem{Key: "description", Value: m.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
}