// UnmarshalJSON deserializes into a FullAccount instance
544838
func (u *FullAccount) UnmarshalJSON(b []byte) error {
	type wrap struct {
		// AccountId : The user's unique Dropbox ID.
		AccountId string `json:"account_id"`
		// Name : Details of a user's name.
		Name *Name `json:"name"`
		// Email : The user's e-mail address. Do not rely on this without
		// checking the `email_verified` field. Even then, it's possible that
		// the user has since lost access to their e-mail.
		Email string `json:"email"`
		// EmailVerified : Whether the user has verified their e-mail address.
		EmailVerified bool `json:"email_verified"`
		// Disabled : Whether the user has been disabled.
		Disabled bool `json:"disabled"`
		// Locale : The language that the user specified. Locale tags will be
		// `IETF language tags`
		// <http://en.wikipedia.org/wiki/IETF_language_tag>.
		Locale string `json:"locale"`
		// ReferralLink : The user's `referral link`
		// <https://www.dropbox.com/referrals>.
		ReferralLink string `json:"referral_link"`
		// IsPaired : Whether the user has a personal and work account. If the
		// current account is personal, then `team` will always be nil, but
		// `is_paired` will indicate if a work account is linked.
		IsPaired bool `json:"is_paired"`
		// AccountType : What type of account this user has.
		AccountType *users_common.AccountType `json:"account_type"`
		// RootInfo : The root info for this account.
		RootInfo json.RawMessage `json:"root_info"`
		// ProfilePhotoUrl : URL for the photo representing the user, if one is
		// set.
		ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
		// Country : The user's two-letter country code, if available. Country
		// codes are based on `ISO 3166-1`
		// <http://en.wikipedia.org/wiki/ISO_3166-1>.
		Country string `json:"country,omitempty"`
		// Team : If this account is a member of a team, information about that
		// team.
		Team *FullTeam `json:"team,omitempty"`
		// TeamMemberId : This account's unique team member id. This field will
		// only be present if `team` is present.
		TeamMemberId string `json:"team_member_id,omitempty"`
	}
	var w wrap
	if err := json.Unmarshal(b, &w); err != nil {
		return err
	}
	u.AccountId = w.AccountId
	u.Name = w.Name
	u.Email = w.Email
	u.EmailVerified = w.EmailVerified
	u.Disabled = w.Disabled
	u.Locale = w.Locale
	u.ReferralLink = w.ReferralLink
	u.IsPaired = w.IsPaired
	u.AccountType = w.AccountType
	RootInfo, err := common.IsRootInfoFromJSON(w.RootInfo)
	if err != nil {
		return err
	}
	u.RootInfo = RootInfo
	u.ProfilePhotoUrl = w.ProfilePhotoUrl
	u.Country = w.Country
	u.Team = w.Team
	u.TeamMemberId = w.TeamMemberId
	return nil
}
968078
func (o *LoadBalancerListener) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realLoadBalancerListener
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = LoadBalancerListener(r)
	return nil
}
1313103
func (instance *ApplicationInstanceStatus) UnmarshalJSON(data []byte) error {
	var ccInstance struct {
		State            string `json:"state"`
		IsolationSegment string `json:"isolation_segment"`
		Stats            struct {
			Usage struct {
				Disk   int64   `json:"disk"`
				Memory int64   `json:"mem"`
				CPU    float64 `json:"cpu"`
			} `json:"usage"`
			MemoryQuota int64 `json:"mem_quota"`
			DiskQuota   int64 `json:"disk_quota"`
			Uptime      int64 `json:"uptime"`
		} `json:"stats"`
	}
	err := cloudcontroller.DecodeJSON(data, &ccInstance)
	if err != nil {
		return err
	}

	instance.CPU = ccInstance.Stats.Usage.CPU
	instance.Disk = ccInstance.Stats.Usage.Disk
	instance.DiskQuota = ccInstance.Stats.DiskQuota
	instance.IsolationSegment = ccInstance.IsolationSegment
	instance.Memory = ccInstance.Stats.Usage.Memory
	instance.MemoryQuota = ccInstance.Stats.MemoryQuota
	instance.State = constant.ApplicationInstanceState(ccInstance.State)
	instance.Uptime = ccInstance.Stats.Uptime

	return nil
}
1268479
func (fields *UserProfileCustomFields) UnmarshalJSON(b []byte) error {
	// https://github.com/nlopes/slack/pull/298#discussion_r185159233
	if string(b) == "[]" {
		return nil
	}
	return json.Unmarshal(b, &fields.fields)
}
1168100
func (v *BinaryAnnotation) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3b0ebf6aDecodeGithubComSignalfxGatewayProtocolSignalfxFormat8(&r, v)
	return r.Error()
}
1288067
func (o *LoadBalancerAttachment) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realLoadBalancerAttachment
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = LoadBalancerAttachment(r)
	return nil
}
254869
func (d *TransferDestination) UnmarshalJSON(data []byte) error {
	if id, ok := ParseID(data); ok {
		d.ID = id
		return nil
	}

	type transferDestination TransferDestination
	var v transferDestination
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}

	*d = TransferDestination(v)
	return json.Unmarshal(data, &d.Account)
}
1014834
func (v *bulkIndexRequestCommandOp) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson9de0fcbfDecodeGithubComOlivereElastic(&r, v)
	return r.Error()
}
928347
func (v *Stored) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson692db02bDecodeGithubComMailgunMailgunGoEvents1(&r, v)
	return r.Error()
}
1197964
func (vd *VolumeSnapshotDataList) UnmarshalJSON(data []byte) error {
	tmp := VolumeSnapshotDataListCopy{}
	err := json.Unmarshal(data, &tmp)
	if err != nil {
		return err
	}
	tmp2 := VolumeSnapshotDataList(tmp)
	*vd = tmp2
	return nil
}
1372152
func (o *StorageBucketIam) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realStorageBucketIam
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = StorageBucketIam(r)
	return nil
}
245654
func (s *WebAccelCertResponseBody) UnmarshalJSON(data []byte) error {
	targetData := strings.Replace(strings.Replace(string(data), " ", "", -1), "\n", "", -1)
	if targetData == `[]` {
		return nil
	}

	tmp := &struct {
		Current *WebAccelCert   `json:",omitempty"`
		Old     []*WebAccelCert `json:",omitempty"`
	}{}
	if err := json.Unmarshal(data, &tmp); err != nil {
		return err
	}

	s.Current = tmp.Current
	s.Old = tmp.Old
	return nil
}
1302786
func (o *PoolAssociation) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realPoolAssociation
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = PoolAssociation(r)
	return nil
}
432790
func (o *IAMInstanceProfile) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realIAMInstanceProfile
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = IAMInstanceProfile(r)
	return nil
}
1276512
func (v *Storage) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCce3d1beDecodeGithubComMailgunMailgunGoEvents(&r, v)
	return r.Error()
}
978038
func (v *ClientInfo) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCce3d1beDecodeGithubComMailgunMailgunGoEvents8(&r, v)
	return r.Error()
}
842496
func (v *LargePayload) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjsonCfe4e5f0DecodeGithubComFrancoispqtGojayBenchmarks(&r, v)
	return r.Error()
}