* Connection status of the print destination.
* @param {{tags: Array.<string>,
* isOwned: ?boolean,
+ * account: ?string,
* lastAccessTime: ?number,
* isTosAccepted: ?boolean,
* cloudID: ?string,
this.isOwned_ = (opt_params && opt_params.isOwned) || false;
/**
+ * Account this destination is registered for, if known.
+ * @private {string}
+ */
+ this.account_ = (opt_params && opt_params.account) || '';
+
+ /**
* Cache of destination location fetched from tags.
* @private {?string}
*/
return this.isOwned_;
},
+ /**
+ * @return {string} Account this destination is registered for, if known.
+ */
+ get account() {
+ return this.account_;
+ },
+
/** @return {boolean} Whether the destination is local or cloud-based. */
get isLocal() {
return this.origin_ == Destination.Origin.LOCAL ||
return this.description_;
},
+ /**
+ * @return {string} Most relevant string to help user to identify this
+ * destination.
+ */
+ get hint() {
+ if (this.id_ == Destination.GooglePromotedId.DOCS ||
+ this.id_ == Destination.GooglePromotedId.FEDEX) {
+ return this.account_;
+ }
+ return this.location || this.description;
+ },
+
/** @return {!Array.<string>} Tags associated with the destination. */
get tags() {
return this.tags_.slice(0);