code: public static Mode fromProto(PMode pMode) {
      Bits ownerBits = pMode.hasOwnerBits() ? Bits.valueOf(pMode.getOwnerBits().name()) : Bits.NONE;
      Bits groupBits = pMode.hasGroupBits() ? Bits.valueOf(pMode.getGroupBits().name()) : Bits.NONE;
      Bits otherBits = pMode.hasOtherBits() ? Bits.valueOf(pMode.getOtherBits().name()) : Bits.NONE;
      return new Mode(ownerBits, groupBits, otherBits);
    }
docs: Creates {@link Mode} from proto {@link PMode}.
  
  @param pMode proto mode
  @return created mode