// SetPublicKeyConfig sets the PublicKeyConfig field's value.
545510
func (s *GetPublicKeyConfigOutput) SetPublicKeyConfig(v *PublicKeyConfig) *GetPublicKeyConfigOutput {
	s.PublicKeyConfig = v
	return s
}
427756
func (s *NetworkInterface) SetPublicIp(v string) *NetworkInterface {
	s.PublicIp = &v
	return s
}
139719
func (s *RegisterInstanceInput) SetPublicIp(v string) *RegisterInstanceInput {
	s.PublicIp = &v
	return s
}
358597
func (s *UpdatePublicKeyOutput) SetPublicKey(v *PublicKey) *UpdatePublicKeyOutput {
	s.PublicKey = v
	return s
}
1332902
func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
	s.PublicAccessBlockConfiguration = v
	return s
}
1209744
func (c UserClient) LoadPublicKeys(ctx context.Context, __arg LoadPublicKeysArg) (res []PublicKey, err error) {
	err = c.Cli.Call(ctx, "keybase.1.user.loadPublicKeys", []interface{}{__arg}, &res)
	return
}
426274
func (s *CreatePublicKeyOutput) SetPublicKey(v *PublicKey) *CreatePublicKeyOutput {
	s.PublicKey = v
	return s
}
1352591
func (s *GetEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *GetEncryptionConfigOutput {
	s.EncryptionConfig = v
	return s
}
950066
func (s *CreatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *CreatePublicKeyInput {
	s.PublicKeyConfig = v
	return s
}
1366259
func (s *UpdateDevEndpointInput) SetDeletePublicKeys(v []*string) *UpdateDevEndpointInput {
	s.DeletePublicKeys = v
	return s
}
62848
func (c Config) IdentityPublicKey() *bakery.PublicKey {
	key := c.asString(IdentityPublicKey)
	if key == "" {
		return nil
	}
	var pubKey bakery.PublicKey
	err := pubKey.UnmarshalText([]byte(key))
	if err != nil {
		// We check if the key string can be unmarshalled into a PublicKey in the
		// Validate function, so we really do not expect this to fail.
		panic(err)
	}
	return &pubKey
}
924948
func (s *AuthorizerDescription) SetTokenSigningPublicKeys(v map[string]*string) *AuthorizerDescription {
	s.TokenSigningPublicKeys = v
	return s
}
685086
func (s *Cluster) SetClusterPublicKey(v string) *Cluster {
	s.ClusterPublicKey = &v
	return s
}
803878
func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer {
	s.PublicPorts = v
	return s
}
1008134
func (s *PutEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *PutEncryptionConfigOutput {
	s.EncryptionConfig = v
	return s
}
82204
func WritePublicKey(pkiPath, name string, key crypto.PublicKey) error {
	if key == nil {
		return errors.New("public key cannot be nil when writing to file")
	}

	publicKeyBytes, err := EncodePublicKeyPEM(key)
	if err != nil {
		return err
	}
	publicKeyPath := pathForPublicKey(pkiPath, name)
	if err := keyutil.WriteKey(publicKeyPath, publicKeyBytes); err != nil {
		return errors.Wrapf(err, "unable to write public key to file %s", publicKeyPath)
	}

	return nil
}
540158
func UpdatePublicKey(key *PublicKey) error {
	_, err := x.Id(key.ID).AllCols().Update(key)
	return err
}