func CoreCharmOrigin(origin corecharm.Origin) Origin {
	var ch charm.Channel
	if origin.Channel != nil {
		ch = *origin.Channel
	}
	var track *string
	if ch.Track != "" {
		track = &ch.Track
	}
	var branch *string
	if ch.Branch != "" {
		branch = &ch.Branch
	}
	return Origin{
		Source:       OriginSource(origin.Source),
		Type:         origin.Type,
		ID:           origin.ID,
		Hash:         origin.Hash,
		Revision:     origin.Revision,
		Risk:         string(ch.Risk),
		Track:        track,
		Branch:       branch,
		Architecture: origin.Platform.Architecture,
		OS:           origin.Platform.OS,
		Series:       origin.Platform.Series,
		InstanceKey:  origin.InstanceKey,
	}
}
// CoreCharmOrigin is a helper function to convert params.CharmOrigin
// to an Origin.
CoreCharmOrigin is a helper function to convert params.CharmOrigin
to an Origin.
// CoreCharmOrigin is a helper function to convert params . CharmOrigin // to an Origin .
func CoreCharmOrigin(origin corecharm.Origin) Origin {
	var ch charm.Channel
	if origin.Channel != nil {
		ch = *origin.Channel
	}
	var track *string
	if ch.Track != "" {
		track = &ch.Track
	}
	var branch *string
	if ch.Branch != "" {
		branch = &ch.Branch
	}
	return Origin{
		Source:       OriginSource(origin.Source),
		Type:         origin.Type,
		ID:           origin.ID,
		Hash:         origin.Hash,
		Revision:     origin.Revision,
		Risk:         string(ch.Risk),
		Track:        track,
		Branch:       branch,
		Architecture: origin.Platform.Architecture,
		OS:           origin.Platform.OS,
		Series:       origin.Platform.Series,
		InstanceKey:  origin.InstanceKey,
	}
}
func CoreCharmOrigin ( origin corecharm . Origin ) Origin { var ch charm . Channel if origin . Channel != nil { ch = * origin . Channel } var track * string if ch . Track != " " { track = & ch . Track } var branch * string if ch . Branch != " " { branch = & ch . Branch } return Origin { Source : OriginSource ( origin . Source ) , Type : origin . Type , ID : origin . ID , Hash : origin . Hash , Revision : origin . Revision , Risk : string ( ch . Risk ) , Track : track , Branch : branch , Architecture : origin . Platform . Architecture , OS : origin . Platform . OS , Series : origin . Platform . Series , InstanceKey : origin . InstanceKey , } }
CoreCharmOrigin is a helper function to convert params.CharmOrigin
to an Origin.
CoreCharmOrigin is a helper function to convert params . CharmOrigin to an Origin .