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

io.reactiverse.elasticsearch.client.reactivex.CcrClient Maven / Gradle / Ivy

/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you 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 io.reactiverse.elasticsearch.client.reactivex;

import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import org.elasticsearch.client.ccr.PutFollowRequest;
import org.elasticsearch.client.ccr.CcrStatsRequest;
import org.elasticsearch.client.ccr.FollowInfoResponse;
import org.elasticsearch.client.ccr.ForgetFollowerRequest;
import org.elasticsearch.client.ccr.PutFollowResponse;
import org.elasticsearch.client.ccr.DeleteAutoFollowPatternRequest;
import org.elasticsearch.client.ccr.FollowStatsResponse;
import org.elasticsearch.client.ccr.PauseFollowRequest;
import org.elasticsearch.client.ccr.UnfollowRequest;
import org.elasticsearch.client.ccr.PutAutoFollowPatternRequest;
import org.elasticsearch.client.ccr.GetAutoFollowPatternResponse;
import org.elasticsearch.client.ccr.FollowStatsRequest;
import org.elasticsearch.client.ccr.ResumeFollowRequest;
import org.elasticsearch.client.ccr.FollowInfoRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.core.AcknowledgedResponse;
import org.elasticsearch.client.ccr.GetAutoFollowPatternRequest;
import org.elasticsearch.client.ccr.CcrStatsResponse;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import org.elasticsearch.client.core.BroadcastResponse;


@io.vertx.lang.rx.RxGen(io.reactiverse.elasticsearch.client.CcrClient.class)
public class CcrClient {

  @Override
  public String toString() {
    return delegate.toString();
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    CcrClient that = (CcrClient) o;
    return delegate.equals(that.delegate);
  }
  
  @Override
  public int hashCode() {
    return delegate.hashCode();
  }

  public static final io.vertx.lang.rx.TypeArg __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>(    obj -> new CcrClient((io.reactiverse.elasticsearch.client.CcrClient) obj),
    CcrClient::getDelegate
  );

  private final io.reactiverse.elasticsearch.client.CcrClient delegate;
  
  public CcrClient(io.reactiverse.elasticsearch.client.CcrClient delegate) {
    this.delegate = delegate;
  }

  public io.reactiverse.elasticsearch.client.CcrClient getDelegate() {
    return delegate;
  }

  public void putFollowAsync(PutFollowRequest request, RequestOptions options, Handler> handler) { 
    delegate.putFollowAsync(request, options, handler);
  }

  public Single rxPutFollowAsync(PutFollowRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      putFollowAsync(request, options, handler);
    });
  }

  public void pauseFollowAsync(PauseFollowRequest request, RequestOptions options, Handler> handler) { 
    delegate.pauseFollowAsync(request, options, handler);
  }

  public Single rxPauseFollowAsync(PauseFollowRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      pauseFollowAsync(request, options, handler);
    });
  }

  public void resumeFollowAsync(ResumeFollowRequest request, RequestOptions options, Handler> handler) { 
    delegate.resumeFollowAsync(request, options, handler);
  }

  public Single rxResumeFollowAsync(ResumeFollowRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      resumeFollowAsync(request, options, handler);
    });
  }

  public void unfollowAsync(UnfollowRequest request, RequestOptions options, Handler> handler) { 
    delegate.unfollowAsync(request, options, handler);
  }

  public Single rxUnfollowAsync(UnfollowRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      unfollowAsync(request, options, handler);
    });
  }

  public void forgetFollowerAsync(ForgetFollowerRequest request, RequestOptions options, Handler> handler) { 
    delegate.forgetFollowerAsync(request, options, handler);
  }

  public Single rxForgetFollowerAsync(ForgetFollowerRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      forgetFollowerAsync(request, options, handler);
    });
  }

  public void putAutoFollowPatternAsync(PutAutoFollowPatternRequest request, RequestOptions options, Handler> handler) { 
    delegate.putAutoFollowPatternAsync(request, options, handler);
  }

  public Single rxPutAutoFollowPatternAsync(PutAutoFollowPatternRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      putAutoFollowPatternAsync(request, options, handler);
    });
  }

  public void deleteAutoFollowPatternAsync(DeleteAutoFollowPatternRequest request, RequestOptions options, Handler> handler) { 
    delegate.deleteAutoFollowPatternAsync(request, options, handler);
  }

  public Single rxDeleteAutoFollowPatternAsync(DeleteAutoFollowPatternRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      deleteAutoFollowPatternAsync(request, options, handler);
    });
  }

  public void getAutoFollowPatternAsync(GetAutoFollowPatternRequest request, RequestOptions options, Handler> handler) { 
    delegate.getAutoFollowPatternAsync(request, options, handler);
  }

  public Single rxGetAutoFollowPatternAsync(GetAutoFollowPatternRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      getAutoFollowPatternAsync(request, options, handler);
    });
  }

  public void getCcrStatsAsync(CcrStatsRequest request, RequestOptions options, Handler> handler) { 
    delegate.getCcrStatsAsync(request, options, handler);
  }

  public Single rxGetCcrStatsAsync(CcrStatsRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      getCcrStatsAsync(request, options, handler);
    });
  }

  public void getFollowStatsAsync(FollowStatsRequest request, RequestOptions options, Handler> handler) { 
    delegate.getFollowStatsAsync(request, options, handler);
  }

  public Single rxGetFollowStatsAsync(FollowStatsRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      getFollowStatsAsync(request, options, handler);
    });
  }

  public void getFollowInfoAsync(FollowInfoRequest request, RequestOptions options, Handler> handler) { 
    delegate.getFollowInfoAsync(request, options, handler);
  }

  public Single rxGetFollowInfoAsync(FollowInfoRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      getFollowInfoAsync(request, options, handler);
    });
  }


  public static  CcrClient newInstance(io.reactiverse.elasticsearch.client.CcrClient arg) {
    return arg != null ? new CcrClient(arg) : null;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy