class LeaseLock extends ResourceLock<Lease> {

  public LeaseLock(String leaseNamespace, String leaseName, String identity) {
    super(leaseNamespace, leaseName, identity);
  }

  public LeaseLock(ObjectMeta meta, String identity) {
    super(meta, identity);
  }

  @Override
  protected Class<Lease> getKind() {
    return Lease.class;
  }

  @Override
  protected Lease toResource(LeaderElectionRecord leaderElectionRecord, ObjectMetaBuilder meta) {
    return new LeaseBuilder().withMetadata(meta.build())
        .withNewSpec()
        .withHolderIdentity(leaderElectionRecord.getHolderIdentity())
        .withLeaseDurationSeconds((int) leaderElectionRecord.getLeaseDuration().get(ChronoUnit.SECONDS))
        .withAcquireTime(leaderElectionRecord.getAcquireTime())
        .withRenewTime(leaderElectionRecord.getRenewTime())
        .withLeaseTransitions(leaderElectionRecord.getLeaderTransitions())
        .endSpec()
        .build();
  }

  @Override
  protected LeaderElectionRecord toRecord(Lease resource) {<FILL_FUNCTION_BODY>}

}

    return Optional.ofNullable(resource.getSpec()).map(spec -> new LeaderElectionRecord(
        spec.getHolderIdentity(),
        Duration.ofSeconds(spec.getLeaseDurationSeconds()),
        spec.getAcquireTime(),
        spec.getRenewTime(),
        Optional.ofNullable(spec.getLeaseTransitions()).orElse(0))).orElse(null);
  
<methods>public void <init>(java.lang.String, java.lang.String, java.lang.String) ,public void <init>(ObjectMeta, java.lang.String) ,public synchronized void create(io.fabric8.kubernetes.client.KubernetesClient, io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.LeaderElectionRecord) ,public java.lang.String describe() ,public synchronized io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.LeaderElectionRecord get(io.fabric8.kubernetes.client.KubernetesClient) ,public java.lang.String identity() ,public synchronized void update(io.fabric8.kubernetes.client.KubernetesClient, io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.LeaderElectionRecord) <variables>private final non-sealed java.lang.String identity,private final non-sealed ObjectMeta meta,private Lease resource