// UnmarshalChaincodeDeploymentSpec unmarshals a ChaincodeDeploymentSpec from
// the provided bytes
343194
func UnmarshalChaincodeDeploymentSpec(cdsBytes []byte) (*peer.ChaincodeDeploymentSpec, error) {
	cds := &peer.ChaincodeDeploymentSpec{}
	err := proto.Unmarshal(cdsBytes, cds)
	if err != nil {
		return nil, errors.Wrap(err, "error unmarshaling ChaincodeDeploymentSpec")
	}

	return cds, nil
}
1251896
func (u *RelocationBatchErrorEntry) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// RelocationError : User errors that retry won't help.
		RelocationError json.RawMessage `json:"relocation_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "relocation_error":
		err = json.Unmarshal(w.RelocationError, &u.RelocationError)

		if err != nil {
			return err
		}
	}
	return nil
}
388182
func (us *UnreachableStrategy) UnmarshalJSON(b []byte) error {
	var u unreachableStrategy
	var errEnabledUS, errNonEnabledUS error
	if errEnabledUS = json.Unmarshal(b, &u); errEnabledUS == nil {
		*us = UnreachableStrategy(u)
		return nil
	}

	if errNonEnabledUS = json.Unmarshal(b, &us.AbsenceReason); errNonEnabledUS == nil {
		return nil
	}

	return fmt.Errorf("failed to unmarshal unreachable strategy: unmarshaling into enabled returned error '%s'; unmarshaling into non-enabled returned error '%s'", errEnabledUS, errNonEnabledUS)
}
278278
func (x *QuestionnaireResponse) UnmarshalJSON(data []byte) (err error) {
	x2 := questionnaireResponse{}
	if err = json.Unmarshal(data, &x2); err == nil {
		if x2.Contained != nil {
			for i := range x2.Contained {
				x2.Contained[i] = MapToResource(x2.Contained[i], true)
			}
		}
		*x = QuestionnaireResponse(x2)
		return x.checkResourceType()
	}
	return
}
63857
func (self *Coder) Unmarshal(in []byte, data interface{}) error {
	return self.unmarshaller(in, data)
}
1674
func (cp *CPUManagerCheckpoint) UnmarshalCheckpoint(blob []byte) error {
	return json.Unmarshal(blob, cp)
}
979566
func (v *CBGravatar) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonB0500db0DecodeGithubComFrancoispqtGojayBenchmarks3(&r, v)
	return r.Error()
}
675662
func UnmarshalConfigEnvelope(data []byte) (*cb.ConfigEnvelope, error) {
	configEnv := &cb.ConfigEnvelope{}
	err := proto.Unmarshal(data, configEnv)
	if err != nil {
		return nil, err
	}
	return configEnv, nil
}
768472
func (a *AnySchedule) UnmarshalJSON(b []byte) error {
	schedule, err := ScheduleUnmarshalJSON(b)

	if err != nil {
		return err
	}

	a.Schedule = schedule

	return nil
}
366668
func unmarshalerDecoder(d *decodeState, v reflect.Value, opts decOpts) int {
	um, ok := v.Interface().(Unmarshaler)
	if !ok {
		panic(fmt.Errorf("Non-Unmarshaler passed to unmarshalerEncoder"))
	}

	read, err := um.UnmarshalTLS(d.Bytes())
	if err != nil {
		panic(err)
	}

	if read > d.Len() {
		panic(fmt.Errorf("Invalid return value from UnmarshalTLS"))
	}

	d.Next(read)
	return read
}
564831
func (x *OperationOutcome) UnmarshalJSON(data []byte) (err error) {
	x2 := operationOutcome{}
	if err = json.Unmarshal(data, &x2); err == nil {
		if x2.Contained != nil {
			for i := range x2.Contained {
				x2.Contained[i] = MapToResource(x2.Contained[i], true)
			}
		}
		*x = OperationOutcome(x2)
		return x.checkResourceType()
	}
	return
}
34711
func parseAddrSpec(addr, domain string) *addrSpec {
	const postmaster string = "postmaster"

	if addr == "" || addr == "@" {
		return &addrSpec{postmaster, domain}
	}

	var l, d string
	i := strings.LastIndexByte(addr, '@')
	if i < 0 || i == len(addr)-1 { // local[@]
		d = domain
	} else {
		d = addr[i+1:]
	}
	if i == 0 { // @domain
		l = postmaster
	} else {
		l = addr[:i]
	}

	return &addrSpec{l, d}
}
1170000
func (ccpack *SignedCDSPackage) GetDepSpec() *pb.ChaincodeDeploymentSpec {
	//this has to be after creating a package and initializing it
	//If those steps fail, GetDepSpec() should never be called
	if ccpack.depSpec == nil {
		panic("GetDepSpec called on uninitialized package")
	}
	return ccpack.depSpec
}
921581
func (p *RekeyConfPayload) UnmarshalBinary(data []byte) error {
	return p.ServLoRaWANVersion.UnmarshalBinary(data)
}
1310138
func (v *bulkDeleteRequestCommandOp) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson8092efb6DecodeGithubComOlivereElastic(&r, v)
	return r.Error()
}
698314
func UnmarshalDecoderToChan(in SimpleDecoder, c interface{}) error {
	if c == nil {
		return fmt.Errorf("goscv: channel is %v", c)
	}
	return readEach(in, c)
}
628442
func UnmarshalJSON(bs []byte, x interface{}) (err error) {
	buf := bytes.NewBuffer(bs)
	decoder := NewJSONDecoder(buf)
	return decoder.Decode(x)
}