def _get_tunnel_context_mask(address_translations=False, internal_subnets=
    False, remote_subnets=False, static_subnets=False, service_subnets=False):
    """Yields a mask object for a tunnel context.

    All exposed properties on the tunnel context service are included in
    the constructed mask. Additional joins may be requested.

    :param bool address_translations: Whether to join the context's address
           translation entries.
    :param bool internal_subnets: Whether to join the context's internal
           subnet associations.
    :param bool remote_subnets: Whether to join the context's remote subnet
           associations.
    :param bool static_subnets: Whether to join the context's statically
           routed subnet associations.
    :param bool service_subnets: Whether to join the SoftLayer service
           network subnets.
    :return string: Encoding for the requested mask object.
    """
    entries = ['id', 'accountId', 'advancedConfigurationFlag', 'createDate',
        'customerPeerIpAddress', 'modifyDate', 'name', 'friendlyName',
        'internalPeerIpAddress', 'phaseOneAuthentication',
        'phaseOneDiffieHellmanGroup', 'phaseOneEncryption',
        'phaseOneKeylife', 'phaseTwoAuthentication',
        'phaseTwoDiffieHellmanGroup', 'phaseTwoEncryption',
        'phaseTwoKeylife', 'phaseTwoPerfectForwardSecrecy', 'presharedKey']
    if address_translations:
        entries.append(
            'addressTranslations[internalIpAddressRecord[ipAddress],customerIpAddressRecord[ipAddress]]'
            )
    if internal_subnets:
        entries.append('internalSubnets')
    if remote_subnets:
        entries.append('customerSubnets')
    if static_subnets:
        entries.append('staticRouteSubnets')
    if service_subnets:
        entries.append('serviceSubnets')
    return '[mask[{}]]'.format(','.join(entries))
