// NewParameterCodec creates a ParameterCodec capable of transforming url values into versioned objects and back.
767794
func NewParameterCodec(scheme *Scheme) ParameterCodec {
	return &parameterCodec{
		typer:     ObjectTyperToTyper(scheme),
		convertor: scheme,
		creator:   scheme,
	}
}
779844
func (s *ConfigurationService) NewListCapabilitiesParams() *ListCapabilitiesParams {
	p := &ListCapabilitiesParams{}
	p.p = make(map[string]interface{})
	return p
}
1296808
func (s *NetworkService) NewCreateServiceInstanceParams(leftnetworkid string, name string, rightnetworkid string, serviceofferingid string, templateid string, zoneid string) *CreateServiceInstanceParams {
	p := &CreateServiceInstanceParams{}
	p.p = make(map[string]interface{})
	p.p["leftnetworkid"] = leftnetworkid
	p.p["name"] = name
	p.p["rightnetworkid"] = rightnetworkid
	p.p["serviceofferingid"] = serviceofferingid
	p.p["templateid"] = templateid
	p.p["zoneid"] = zoneid
	return p
}
251849
func NewParamValidator(param *spec.Parameter, formats strfmt.Registry) *ParamValidator {
	p := &ParamValidator{param: param, KnownFormats: formats}
	p.validators = []valueValidator{
		&typeValidator{
			Type:   spec.StringOrArray([]string{param.Type}),
			Format: param.Format,
			In:     param.In,
			Path:   param.Name,
		},
		p.stringValidator(),
		p.formatValidator(),
		p.numberValidator(),
		p.sliceValidator(),
		p.commonValidator(),
	}
	return p
}
1103596
func NewParameter(in interface{}, 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", 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", 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)
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
384250
func NewURLTransformer() URLTransformer {
	return URLTransformer{
		ExactPaths:     []string{},
		RegexpPaths:    map[string]*regexp.Regexp{},
		rxMatchPattern: regexp.MustCompile(rxMatchParameterPattern),
		rxMatchActual:  regexp.MustCompile(rxMatchParameterActual),
		rxStripQuery:   regexp.MustCompile(`\?.*$`)}
}
1051101
func (c *Charmap) NewEncoder() *encoding.Encoder {
	c.Init()
	return &encoding.Encoder{
		Transformer: &cmapEncoder{
			bytes:   c.bytes,
			replace: c.ReplacementChar,
		},
	}
}
1317669
func (c *parameterCodec) EncodeParameters(obj Object, to unversioned.GroupVersion) (url.Values, error) {
	gvk, _, err := c.typer.ObjectKind(obj)
	if err != nil {
		return nil, err
	}
	if to != gvk.GroupVersion() {
		out, err := c.convertor.ConvertToVersion(obj, to.String())
		if err != nil {
			return nil, err
		}
		obj = out
	}
	return queryparams.Convert(obj)
}
425902
func NewCodecForScheme(
	// TODO: I should be a scheme interface?
	scheme *runtime.Scheme,
	serializer runtime.Serializer,
	encodeVersion []unversioned.GroupVersion,
	decodeVersion []unversioned.GroupVersion,
) runtime.Codec {
	return NewCodec(serializer, scheme, scheme, scheme, runtime.ObjectTyperToTyper(scheme), encodeVersion, decodeVersion)
}
440053
func (s *NetworkACLService) NewCreateNetworkACLParams(protocol string) *CreateNetworkACLParams {
	p := &CreateNetworkACLParams{}
	p.p = make(map[string]interface{})
	p.p["protocol"] = protocol
	return p
}
354768
func NewDecoder(data []byte) *Decoder {
	return &Decoder{
		data: data,
		end:  len(data),
	}
}
968880
func (s *VolumeService) NewUploadVolumeParams(format string, name string, url string, zoneid string) *UploadVolumeParams {
	p := &UploadVolumeParams{}
	p.p = make(map[string]interface{})
	p.p["format"] = format
	p.p["name"] = name
	p.p["url"] = url
	p.p["zoneid"] = zoneid
	return p
}
1334599
func NewParameters(timeout, locale string, envelopeSize int) *Parameters {
	return &Parameters{
		Timeout:      timeout,
		Locale:       locale,
		EnvelopeSize: envelopeSize,
	}
}
819327
func NewCodec(ws *websocket.Conn) *codec {
	c := &codec{
		WS: ws,
	}
	return c
}
1315569
func NewGobEncoder() GobEncoder {
	// Register non-primitive dosa types
	gob.Register(time.Time{})
	gob.Register(dosa.NewUUID())
	return GobEncoder{}
}
10056
func (s *CertificateService) NewUploadCustomCertificateParams(certificate string, domainsuffix string) *UploadCustomCertificateParams {
	p := &UploadCustomCertificateParams{}
	p.p = make(map[string]interface{})
	p.p["certificate"] = certificate
	p.p["domainsuffix"] = domainsuffix
	return p
}
163467
func NewDecoder(r io.ReadCloser, codec runtime.Codec) *Decoder {
	return &Decoder{
		r:       r,
		decoder: json.NewDecoder(r),
		codec:   codec,
	}
}