function parseCloudDestination(json, origin, account) {
    if (!json.hasOwnProperty(CloudDestinationField.ID) ||
        !json.hasOwnProperty(CloudDestinationField.TYPE) ||
        !json.hasOwnProperty(CloudDestinationField.DISPLAY_NAME)) {
      throw Error('Cloud destination does not have an ID or a display name');
    }
    const id = json[CloudDestinationField.ID];
    const tags = json[CloudDestinationField.TAGS] || [];
    const connectionStatus = json[CloudDestinationField.CONNECTION_STATUS] ||
        print_preview.DestinationConnectionStatus.UNKNOWN;
    const optionalParams = {
      account: account,
      tags: tags,
      isOwned: arrayContains(tags, OWNED_TAG),
      lastAccessTime:
          parseInt(json[CloudDestinationField.LAST_ACCESS], 10) || Date.now(),
      cloudID: id,
      description: json[CloudDestinationField.DESCRIPTION],
      certificateStatus: extractCertificateStatus(tags),
    };
    const cloudDest = new print_preview.Destination(
        id, parseType(json[CloudDestinationField.TYPE]), origin,
        json[CloudDestinationField.DISPLAY_NAME],
        arrayContains(tags, RECENT_TAG) /*isRecent*/, connectionStatus,
        optionalParams);
    if (json.hasOwnProperty(CloudDestinationField.CAPABILITIES)) {
      cloudDest.capabilities = /** @type {!print_preview.Cdd} */ (
          json[CloudDestinationField.CAPABILITIES]);
    }
    return cloudDest;
  }
/**
   * Parses a destination from JSON from a Google Cloud Print search or printer
   * response.
   * @param {!Object} json Object that represents a Google Cloud Print search or
   *     printer response.
   * @param {!print_preview.DestinationOrigin} origin The origin of the
   *     response.
   * @param {string} account The account this destination is registered for or
   *     empty string, if origin != COOKIES.
   * @return {!print_preview.Destination} Parsed destination.
   */
Parses a destination from JSON from a Google Cloud Print search or printer
response.
@param {!Object} json Object that represents a Google Cloud Print search or
printer response.
@param {!print_preview.DestinationOrigin} origin The origin of the
response.
@param {string} account The account this destination is registered for or
empty string, if origin != COOKIES.
Parses a destination from JSON from a Google Cloud Print search or printer response . @param { !Object } json Object that represents a Google Cloud Print search or printer response . @param { !print_preview . DestinationOrigin } origin The origin of the response . @param { string } account The account this destination is registered for or empty string if origin ! = COOKIES .
function parseCloudDestination(json, origin, account) {
    if (!json.hasOwnProperty(CloudDestinationField.ID) ||
        !json.hasOwnProperty(CloudDestinationField.TYPE) ||
        !json.hasOwnProperty(CloudDestinationField.DISPLAY_NAME)) {
      throw Error('Cloud destination does not have an ID or a display name');
    }
    const id = json[CloudDestinationField.ID];
    const tags = json[CloudDestinationField.TAGS] || [];
    const connectionStatus = json[CloudDestinationField.CONNECTION_STATUS] ||
        print_preview.DestinationConnectionStatus.UNKNOWN;
    const optionalParams = {
      account: account,
      tags: tags,
      isOwned: arrayContains(tags, OWNED_TAG),
      lastAccessTime:
          parseInt(json[CloudDestinationField.LAST_ACCESS], 10) || Date.now(),
      cloudID: id,
      description: json[CloudDestinationField.DESCRIPTION],
      certificateStatus: extractCertificateStatus(tags),
    };
    const cloudDest = new print_preview.Destination(
        id, parseType(json[CloudDestinationField.TYPE]), origin,
        json[CloudDestinationField.DISPLAY_NAME],
        arrayContains(tags, RECENT_TAG) , connectionStatus,
        optionalParams);
    if (json.hasOwnProperty(CloudDestinationField.CAPABILITIES)) {
      cloudDest.capabilities =  (
          json[CloudDestinationField.CAPABILITIES]);
    }
    return cloudDest;
  }
function parseCloudDestination ( json , origin , account ) { if ( ! json . hasOwnProperty ( CloudDestinationField . ID ) || ! json . hasOwnProperty ( CloudDestinationField . TYPE ) || ! json . hasOwnProperty ( CloudDestinationField . DISPLAY_NAME ) ) { throw Error ( 'Cloud destination does not have an ID or a display name' ) ; } const id = json [ CloudDestinationField . ID ] ; const tags = json [ CloudDestinationField . TAGS ] || [ ] ; const connectionStatus = json [ CloudDestinationField . CONNECTION_STATUS ] || print_preview . DestinationConnectionStatus . UNKNOWN ; const optionalParams = { account : account , tags : tags , isOwned : arrayContains ( tags , OWNED_TAG ) , lastAccessTime : parseInt ( json [ CloudDestinationField . LAST_ACCESS ] , 10 ) || Date . now ( ) , cloudID : id , description : json [ CloudDestinationField . DESCRIPTION ] , certificateStatus : extractCertificateStatus ( tags ) , } ; const cloudDest = new print_preview . Destination ( id , parseType ( json [ CloudDestinationField . TYPE ] ) , origin , json [ CloudDestinationField . DISPLAY_NAME ] , arrayContains ( tags , RECENT_TAG ) , connectionStatus , optionalParams ) ; if ( json . hasOwnProperty ( CloudDestinationField . CAPABILITIES ) ) { cloudDest . capabilities = ( json [ CloudDestinationField . CAPABILITIES ] ) ; } return cloudDest ; }
Parses a destination from JSON from a Google Cloud Print search or printer
 response.
Parses a destination from JSON from a Google Cloud Print search or printer response .
/*isRecent*/ /** @type {!print_preview.Cdd} */