func (c *WebAuthn) RemoveCredentialWithParams(ctx context.Context, v *WebAuthnRemoveCredentialParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.removeCredential", Params: v})
}
RemoveCredentialWithParams - Removes a credential from the authenticator.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type WebAuthnVirtualAuthenticatorOptions struct {
	Protocol                    string `json:"protocol"`                               
	Ctap2Version                string `json:"ctap2Version,omitempty"`                 
	Transport                   string `json:"transport"`                              
	HasResidentKey              bool   `json:"hasResidentKey,omitempty"`               
	HasUserVerification         bool   `json:"hasUserVerification,omitempty"`          
	HasLargeBlob                bool   `json:"hasLargeBlob,omitempty"`                 
	HasCredBlob                 bool   `json:"hasCredBlob,omitempty"`                  
	AutomaticPresenceSimulation bool   `json:"automaticPresenceSimulation,omitempty"`  
	IsUserVerified              bool   `json:"isUserVerified,omitempty"`               
}
type WebAuthnCredential struct {
	CredentialId         string `json:"credentialId"`          
	IsResidentCredential bool   `json:"isResidentCredential"`  
	RpId                 string `json:"rpId,omitempty"`        
	PrivateKey           string `json:"privateKey"`            
	UserHandle           string `json:"userHandle,omitempty"`  
	SignCount            int    `json:"signCount"`             
	LargeBlob            string `json:"largeBlob,omitempty"`   
}
type WebAuthn struct {
	target gcdmessage.ChromeTargeter
}
func NewWebAuthn(target gcdmessage.ChromeTargeter) *WebAuthn {
	c := &WebAuthn{target: target}
	return c
}
func (c *WebAuthn) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.enable"})
}
func (c *WebAuthn) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.disable"})
}
type WebAuthnAddVirtualAuthenticatorParams struct {
	Options *WebAuthnVirtualAuthenticatorOptions `json:"options"`
}
func (c *WebAuthn) AddVirtualAuthenticatorWithParams(ctx context.Context, v *WebAuthnAddVirtualAuthenticatorParams) (string, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.addVirtualAuthenticator", Params: v})
	if err != nil {
		return "", err
	}
	var chromeData struct {
		Result struct {
			AuthenticatorId string
		}
	}
	if resp == nil {
		return "", &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", err
	}
	return chromeData.Result.AuthenticatorId, nil
}
func (c *WebAuthn) AddVirtualAuthenticator(ctx context.Context, options *WebAuthnVirtualAuthenticatorOptions) (string, error) {
	var v WebAuthnAddVirtualAuthenticatorParams
	v.Options = options
	return c.AddVirtualAuthenticatorWithParams(ctx, &v)
}
type WebAuthnRemoveVirtualAuthenticatorParams struct {
	AuthenticatorId string `json:"authenticatorId"`
}
func (c *WebAuthn) RemoveVirtualAuthenticatorWithParams(ctx context.Context, v *WebAuthnRemoveVirtualAuthenticatorParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.removeVirtualAuthenticator", Params: v})
}
func (c *WebAuthn) RemoveVirtualAuthenticator(ctx context.Context, authenticatorId string) (*gcdmessage.ChromeResponse, error) {
	var v WebAuthnRemoveVirtualAuthenticatorParams
	v.AuthenticatorId = authenticatorId
	return c.RemoveVirtualAuthenticatorWithParams(ctx, &v)
}
type WebAuthnAddCredentialParams struct {
	AuthenticatorId string `json:"authenticatorId"`
	Credential *WebAuthnCredential `json:"credential"`
}
func (c *WebAuthn) AddCredentialWithParams(ctx context.Context, v *WebAuthnAddCredentialParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.addCredential", Params: v})
}
func (c *WebAuthn) AddCredential(ctx context.Context, authenticatorId string, credential *WebAuthnCredential) (*gcdmessage.ChromeResponse, error) {
	var v WebAuthnAddCredentialParams
	v.AuthenticatorId = authenticatorId
	v.Credential = credential
	return c.AddCredentialWithParams(ctx, &v)
}
type WebAuthnGetCredentialParams struct {
	AuthenticatorId string `json:"authenticatorId"`
	CredentialId string `json:"credentialId"`
}
func (c *WebAuthn) GetCredentialWithParams(ctx context.Context, v *WebAuthnGetCredentialParams) (*WebAuthnCredential, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.getCredential", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Credential *WebAuthnCredential
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Credential, nil
}
func (c *WebAuthn) GetCredential(ctx context.Context, authenticatorId string, credentialId string) (*WebAuthnCredential, error) {
	var v WebAuthnGetCredentialParams
	v.AuthenticatorId = authenticatorId
	v.CredentialId = credentialId
	return c.GetCredentialWithParams(ctx, &v)
}
type WebAuthnGetCredentialsParams struct {
	AuthenticatorId string `json:"authenticatorId"`
}
func (c *WebAuthn) GetCredentialsWithParams(ctx context.Context, v *WebAuthnGetCredentialsParams) ([]*WebAuthnCredential, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "WebAuthn.getCredentials", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Credentials []*WebAuthnCredential
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Credentials, nil
}
func (c *WebAuthn) GetCredentials(ctx context.Context, authenticatorId string) ([]*WebAuthnCredential, error) {
	var v WebAuthnGetCredentialsParams
	v.AuthenticatorId = authenticatorId
	return c.GetCredentialsWithParams(ctx, &v)
}
type WebAuthnRemoveCredentialParams struct {
	AuthenticatorId string `json:"authenticatorId"`
	CredentialId string `json:"credentialId"`
}