code: public java.lang.String getTasksOrDefault(
        int key,
        java.lang.String defaultValue) {
      
      java.util.Map<java.lang.Integer, java.lang.String> map =
          internalGetTasks().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
docs: <pre>
  Mapping from task ID to "hostname:port" string.
  If the `name` field contains "worker", and the `tasks` map contains a
  mapping from 7 to "example.org:2222", then the device prefix
  "/job:worker/task:7" will be assigned to "example.org:2222".
  NOTE(mrry): Currently, only a dense task ID space starting at 0 is
  supported.
  </pre>
  
  <code>map&lt;int32, string&gt; tasks = 2;</code>