func (c *Config) Sparse(context *cli.Context) *Config {
	return c.commonSparse(context)
}
Sparse returns a copy of this config with obvious values removed.
package lib
import (
	"os"
	"path/filepath"
	"github.com/urfave/cli"
)
const (
	platformName = "Windows"
	defaultConfigFilename = "gcp-windows-connector.config.json"
)
type Config struct {
	LocalPrintingEnable bool `json:"local_printing_enable"`
	CloudPrintingEnable bool `json:"cloud_printing_enable"`
	FcmNotificationsEnable bool `json:"fcm_notifications_enable"`
	XMPPJID string `json:"xmpp_jid,omitempty"`
	RobotRefreshToken string `json:"robot_refresh_token,omitempty"`
	UserRefreshToken string `json:"user_refresh_token,omitempty"`
	ShareScope string `json:"share_scope,omitempty"`
	ProxyName string `json:"proxy_name,omitempty"`
	FcmServerBindUrl string `json:"fcm_server_bind_url,omitempty"`
	XMPPServer string `json:"xmpp_server,omitempty"`
	XMPPPort uint16 `json:"xmpp_port,omitempty"`
	XMPPPingTimeout string `json:"gcp_xmpp_ping_timeout,omitempty"`
	XMPPPingInterval string `json:"gcp_xmpp_ping_interval_default,omitempty"`
	GCPBaseURL string `json:"gcp_base_url,omitempty"`
	GCPOAuthClientID string `json:"gcp_oauth_client_id,omitempty"`
	GCPOAuthClientSecret string `json:"gcp_oauth_client_secret,omitempty"`
	GCPOAuthAuthURL string `json:"gcp_oauth_auth_url,omitempty"`
	GCPOAuthTokenURL string `json:"gcp_oauth_token_url,omitempty"`
	GCPMaxConcurrentDownloads uint `json:"gcp_max_concurrent_downloads,omitempty"`
	NativeJobQueueSize uint `json:"cups_job_queue_size,omitempty"`
	NativePrinterPollInterval string `json:"cups_printer_poll_interval,omitempty"`
	CUPSJobFullUsername *bool `json:"cups_job_full_username,omitempty"`
	PrefixJobIDToJobTitle *bool `json:"prefix_job_id_to_job_title,omitempty"`
	DisplayNamePrefix string `json:"display_name_prefix,omitempty"`
	PrinterBlacklist []string `json:"printer_blacklist,omitempty"`
	PrinterWhitelist []string `json:"printer_whitelist,omitempty"`
	LogLevel string `json:"log_level"`
	LocalPortLow uint16 `json:"local_port_low,omitempty"`
	LocalPortHigh uint16 `json:"local_port_high,omitempty"`
}
var DefaultConfig = Config{
	XMPPServer:                "talk.google.com",
	XMPPPort:                  443,
	XMPPPingTimeout:           "5s",
	XMPPPingInterval:          "2m",
	FcmServerBindUrl:          "https://fcm-stream.googleapis.com/fcm/connect/bind",
	GCPBaseURL:                "https://www.google.com/cloudprint/",
	GCPOAuthClientID:          "539833558011-35iq8btpgas80nrs3o7mv99hm95d4dv6.apps.googleusercontent.com",
	GCPOAuthClientSecret:      "V9BfPOvdiYuw12hDx5Y5nR0a",
	GCPOAuthAuthURL:           "https://accounts.google.com/o/oauth2/auth",
	GCPOAuthTokenURL:          "https://accounts.google.com/o/oauth2/token",
	GCPMaxConcurrentDownloads: 5,
	NativeJobQueueSize:        3,
	NativePrinterPollInterval: "1m",
	CUPSJobFullUsername:       PointerToBool(false),
	PrefixJobIDToJobTitle:     PointerToBool(false),
	DisplayNamePrefix:         "",
	PrinterBlacklist: []string{
		"Fax",
		"CutePDF Writer",
		"Microsoft XPS Document Writer",
		"Google Cloud Printer",
	},
	PrinterWhitelist:       []string{},
	LocalPrintingEnable:    true,
	CloudPrintingEnable:    false,
	FcmNotificationsEnable: false,
	LogLevel:               "INFO",
	LocalPortLow:  26000,
	LocalPortHigh: 26999,
}
func getConfigFilename(context *cli.Context) (string, bool) {
	cf := context.String("config-filename")
	if filepath.IsAbs(cf) {
		_, err := os.Stat(cf)
		return cf, err == nil
	}
	absCF, err := filepath.Abs(cf)
	if err != nil {
		return cf, false
	}
	if _, err := os.Stat(absCF); err == nil {
		return absCF, true
	}
	exeFile := os.Args[0]
	exeDir := filepath.Dir(exeFile)
	absCF = filepath.Join(exeDir, cf)
	if _, err := os.Stat(absCF); err == nil {
		return absCF, true
	}
	return absCF, false
}
func (c *Config) Backfill(configMap map[string]interface{}) *Config {
	return c.commonBackfill(configMap)
}