// Encode returns a gob encoded representation of the Instance Identity Password
Encode returns a gob encoded representation of the Instance Identity Password
// Encode returns a gob encoded representation of the Instance Identity Password
func (iip *InstanceIdentityPassword) Encode() (string, error) {
	var password bytes.Buffer
	enc := gob.NewEncoder(&password)
	err := enc.Encode(iip)
	if err != nil {
		return "", err
	}
	var compPassword bytes.Buffer
	comp := gzip.NewWriter(&compPassword)
	_, err = comp.Write(password.Bytes())
	if err != nil {
		return "", err
	}
	if err := comp.Close(); err != nil {
		return "", err
	}
	return base64.StdEncoding.EncodeToString(compPassword.Bytes()), nil
}
func ( iip * InstanceIdentityPassword ) Encode ( ) ( string , error ) { var password bytes . Buffer enc := gob . NewEncoder ( & password ) err := enc . Encode ( iip ) if err != nil { return " " , err } var compPassword bytes . Buffer comp := gzip . NewWriter ( & compPassword ) _ , err = comp . Write ( password . Bytes ( ) ) if err != nil { return " " , err } if err := comp . Close ( ) ; err != nil { return " " , err } return base64 . StdEncoding . EncodeToString ( compPassword . Bytes ( ) ) , nil }
Encode returns a gob encoded representation of the Instance Identity Password
Encode returns a gob encoded representation of the Instance Identity Password