All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kalix.javasdk.client.ValueEntityCallBuilder Maven / Gradle / Ivy

/*
 * Copyright 2021 Lightbend Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package kalix.javasdk.client;

import akka.japi.function.Function;
import akka.japi.function.Function10;
import akka.japi.function.Function11;
import akka.japi.function.Function12;
import akka.japi.function.Function13;
import akka.japi.function.Function14;
import akka.japi.function.Function15;
import akka.japi.function.Function16;
import akka.japi.function.Function17;
import akka.japi.function.Function18;
import akka.japi.function.Function19;
import akka.japi.function.Function2;
import akka.japi.function.Function20;
import akka.japi.function.Function21;
import akka.japi.function.Function22;
import akka.japi.function.Function3;
import akka.japi.function.Function4;
import akka.japi.function.Function5;
import akka.japi.function.Function6;
import akka.japi.function.Function7;
import akka.japi.function.Function8;
import akka.japi.function.Function9;
import com.google.protobuf.any.Any;
import kalix.javasdk.DeferredCall;
import kalix.javasdk.valueentity.ValueEntity;
import kalix.spring.KalixClient;

import java.util.Optional;

public class ValueEntityCallBuilder {

  private final KalixClient kalixClient;
  private final Optional entityId;

  public ValueEntityCallBuilder(KalixClient kalixClient, String entityId) {
    this.kalixClient = kalixClient;
    this.entityId = Optional.of(entityId);
  }

  public ValueEntityCallBuilder(KalixClient kalixClient) {
    this.kalixClient = kalixClient;
    this.entityId = Optional.empty();
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  DeferredCall call(Function> methodRef) {
    return ComponentCall.noParams(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall call(Function2> methodRef) {
    return new ComponentCall<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall2 call(Function3> methodRef) {
    return new ComponentCall2<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall3 call(Function4> methodRef) {
    return new ComponentCall3<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall4 call(Function5> methodRef) {
    return new ComponentCall4<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall5 call(Function6> methodRef) {
    return new ComponentCall5<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall6 call(Function7> methodRef) {
    return new ComponentCall6<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall7 call(Function8> methodRef) {
    return new ComponentCall7<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall8 call(Function9> methodRef) {
    return new ComponentCall8<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall9 call(Function10> methodRef) {
    return new ComponentCall9<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall10 call(Function11> methodRef) {
    return new ComponentCall10<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall11 call(Function12> methodRef) {
    return new ComponentCall11<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall12 call(Function13> methodRef) {
    return new ComponentCall12<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall13 call(Function14> methodRef) {
    return new ComponentCall13<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall14 call(Function15> methodRef) {
    return new ComponentCall14<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall15 call(Function16> methodRef) {
    return new ComponentCall15<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall16 call(Function17> methodRef) {
    return new ComponentCall16<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall17 call(Function18> methodRef) {
    return new ComponentCall17<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall18 call(Function19> methodRef) {
    return new ComponentCall18<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall19 call(Function20> methodRef) {
    return new ComponentCall19<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall20 call(Function21> methodRef) {
    return new ComponentCall20<>(kalixClient, methodRef, entityId);
  }

  /**
   * Pass in a Value Entity method reference annotated as a REST endpoint, e.g. UserEntity::create
   */
  public  ComponentCall21 call(Function22> methodRef) {
    return new ComponentCall21<>(kalixClient, methodRef, entityId);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy