func RefreshOne(key, id string, revision int, channel string, base RefreshBase) (RefreshConfig, error) {
	if id == "" {
		return nil, logAndReturnError(errors.NotValidf("empty id"))
	}
	if key == "" {
		// This is for compatibility reasons.  With older clients, the
		// key created in GetCharmURLOrigin will be lost to and from
		// the client.  Since a key is required, ensure we have one.
		uuid, err := utils.NewUUID()
		if err != nil {
			return nil, logAndReturnError(err)
		}
		key = uuid.String()
	}
	if err := validateBase(base); err != nil {
		return nil, logAndReturnError(err)
	}
	return refreshOne{
		instanceKey: key,
		ID:          id,
		Revision:    revision,
		Channel:     channel,
		Base:        base,
		fields:      requiredRefreshFields,
	}, nil
}
// RefreshOne creates a request config for requesting only one charm.
RefreshOne creates a request config for requesting only one charm.
// RefreshOne creates a request config for requesting only one charm .
func RefreshOne(key, id string, revision int, channel string, base RefreshBase) (RefreshConfig, error) {
	if id == "" {
		return nil, logAndReturnError(errors.NotValidf("empty id"))
	}
	if key == "" {
		uuid, err := utils.NewUUID()
		if err != nil {
			return nil, logAndReturnError(err)
		}
		key = uuid.String()
	}
	if err := validateBase(base); err != nil {
		return nil, logAndReturnError(err)
	}
	return refreshOne{
		instanceKey: key,
		ID:          id,
		Revision:    revision,
		Channel:     channel,
		Base:        base,
		fields:      requiredRefreshFields,
	}, nil
}
func RefreshOne ( key , id string , revision int , channel string , base RefreshBase ) ( RefreshConfig , error ) { if id == " " { return nil , logAndReturnError ( errors . NotValidf ( " " ) ) } if key == " " { uuid , err := utils . NewUUID ( ) if err != nil { return nil , logAndReturnError ( err ) } key = uuid . String ( ) } if err := validateBase ( base ) ; err != nil { return nil , logAndReturnError ( err ) } return refreshOne { instanceKey : key , ID : id , Revision : revision , Channel : channel , Base : base , fields : requiredRefreshFields , } , nil }
RefreshOne creates a request config for requesting only one charm.
RefreshOne creates a request config for requesting only one charm .
// This is for compatibility reasons.  With older clients, the // key created in GetCharmURLOrigin will be lost to and from // the client.  Since a key is required, ensure we have one.