package galaxy_repository.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * <pre>
 * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
 * database). Lets clients enumerate the deployed object hierarchy and each
 * object's dynamic attributes so they know what tag references to subscribe
 * to via the MxAccessGateway service.
 * </pre>
 */
@io.grpc.stub.annotations.GrpcGenerated
public final class GalaxyRepositoryGrpc {

  private GalaxyRepositoryGrpc() {}

  public static final java.lang.String SERVICE_NAME = "galaxy_repository.v1.GalaxyRepository";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> getTestConnectionMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "TestConnection",
      requestType = galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest.class,
      responseType = galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> getTestConnectionMethod() {
    io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> getTestConnectionMethod;
    if ((getTestConnectionMethod = GalaxyRepositoryGrpc.getTestConnectionMethod) == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        if ((getTestConnectionMethod = GalaxyRepositoryGrpc.getTestConnectionMethod) == null) {
          GalaxyRepositoryGrpc.getTestConnectionMethod = getTestConnectionMethod =
              io.grpc.MethodDescriptor.<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestConnection"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply.getDefaultInstance()))
              .setSchemaDescriptor(new GalaxyRepositoryMethodDescriptorSupplier("TestConnection"))
              .build();
        }
      }
    }
    return getTestConnectionMethod;
  }

  private static volatile io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> getGetLastDeployTimeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetLastDeployTime",
      requestType = galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest.class,
      responseType = galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> getGetLastDeployTimeMethod() {
    io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> getGetLastDeployTimeMethod;
    if ((getGetLastDeployTimeMethod = GalaxyRepositoryGrpc.getGetLastDeployTimeMethod) == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        if ((getGetLastDeployTimeMethod = GalaxyRepositoryGrpc.getGetLastDeployTimeMethod) == null) {
          GalaxyRepositoryGrpc.getGetLastDeployTimeMethod = getGetLastDeployTimeMethod =
              io.grpc.MethodDescriptor.<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLastDeployTime"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply.getDefaultInstance()))
              .setSchemaDescriptor(new GalaxyRepositoryMethodDescriptorSupplier("GetLastDeployTime"))
              .build();
        }
      }
    }
    return getGetLastDeployTimeMethod;
  }

  private static volatile io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> getDiscoverHierarchyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "DiscoverHierarchy",
      requestType = galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest.class,
      responseType = galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> getDiscoverHierarchyMethod() {
    io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> getDiscoverHierarchyMethod;
    if ((getDiscoverHierarchyMethod = GalaxyRepositoryGrpc.getDiscoverHierarchyMethod) == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        if ((getDiscoverHierarchyMethod = GalaxyRepositoryGrpc.getDiscoverHierarchyMethod) == null) {
          GalaxyRepositoryGrpc.getDiscoverHierarchyMethod = getDiscoverHierarchyMethod =
              io.grpc.MethodDescriptor.<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DiscoverHierarchy"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply.getDefaultInstance()))
              .setSchemaDescriptor(new GalaxyRepositoryMethodDescriptorSupplier("DiscoverHierarchy"))
              .build();
        }
      }
    }
    return getDiscoverHierarchyMethod;
  }

  private static volatile io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> getWatchDeployEventsMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "WatchDeployEvents",
      requestType = galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest.class,
      responseType = galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> getWatchDeployEventsMethod() {
    io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> getWatchDeployEventsMethod;
    if ((getWatchDeployEventsMethod = GalaxyRepositoryGrpc.getWatchDeployEventsMethod) == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        if ((getWatchDeployEventsMethod = GalaxyRepositoryGrpc.getWatchDeployEventsMethod) == null) {
          GalaxyRepositoryGrpc.getWatchDeployEventsMethod = getWatchDeployEventsMethod =
              io.grpc.MethodDescriptor.<galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WatchDeployEvents"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent.getDefaultInstance()))
              .setSchemaDescriptor(new GalaxyRepositoryMethodDescriptorSupplier("WatchDeployEvents"))
              .build();
        }
      }
    }
    return getWatchDeployEventsMethod;
  }

  private static volatile io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> getBrowseChildrenMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "BrowseChildren",
      requestType = galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest.class,
      responseType = galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest,
      galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> getBrowseChildrenMethod() {
    io.grpc.MethodDescriptor<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> getBrowseChildrenMethod;
    if ((getBrowseChildrenMethod = GalaxyRepositoryGrpc.getBrowseChildrenMethod) == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        if ((getBrowseChildrenMethod = GalaxyRepositoryGrpc.getBrowseChildrenMethod) == null) {
          GalaxyRepositoryGrpc.getBrowseChildrenMethod = getBrowseChildrenMethod =
              io.grpc.MethodDescriptor.<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest, galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BrowseChildren"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply.getDefaultInstance()))
              .setSchemaDescriptor(new GalaxyRepositoryMethodDescriptorSupplier("BrowseChildren"))
              .build();
        }
      }
    }
    return getBrowseChildrenMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static GalaxyRepositoryStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryStub>() {
        @java.lang.Override
        public GalaxyRepositoryStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new GalaxyRepositoryStub(channel, callOptions);
        }
      };
    return GalaxyRepositoryStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports all types of calls on the service
   */
  public static GalaxyRepositoryBlockingV2Stub newBlockingV2Stub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryBlockingV2Stub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryBlockingV2Stub>() {
        @java.lang.Override
        public GalaxyRepositoryBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new GalaxyRepositoryBlockingV2Stub(channel, callOptions);
        }
      };
    return GalaxyRepositoryBlockingV2Stub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static GalaxyRepositoryBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryBlockingStub>() {
        @java.lang.Override
        public GalaxyRepositoryBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new GalaxyRepositoryBlockingStub(channel, callOptions);
        }
      };
    return GalaxyRepositoryBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static GalaxyRepositoryFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<GalaxyRepositoryFutureStub>() {
        @java.lang.Override
        public GalaxyRepositoryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new GalaxyRepositoryFutureStub(channel, callOptions);
        }
      };
    return GalaxyRepositoryFutureStub.newStub(factory, channel);
  }

  /**
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public interface AsyncService {

    /**
     */
    default void testConnection(galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTestConnectionMethod(), responseObserver);
    }

    /**
     */
    default void getLastDeployTime(galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLastDeployTimeMethod(), responseObserver);
    }

    /**
     */
    default void discoverHierarchy(galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDiscoverHierarchyMethod(), responseObserver);
    }

    /**
     * <pre>
     * Server-stream of deploy events. The server emits the current state immediately
     * on subscribe (so clients can bootstrap their cache without waiting for the next
     * deploy), then emits one event each time the gateway's hierarchy cache observes
     * a new galaxy.time_of_last_deploy. The sequence field is monotonically
     * increasing per server start; gaps indicate the per-subscriber buffer dropped
     * older events because the client was too slow.
     * </pre>
     */
    default void watchDeployEvents(galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWatchDeployEventsMethod(), responseObserver);
    }

    /**
     * <pre>
     * Returns the direct children of a parent object (or the root objects when
     * `parent` is unset). Designed for OPC UA-style lazy expand: clients walk
     * one level at a time instead of paging the full hierarchy. Filters mirror
     * DiscoverHierarchy exactly. Backed by the same shared hierarchy cache.
     * </pre>
     */
    default void browseChildren(galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBrowseChildrenMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service GalaxyRepository.
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public static abstract class GalaxyRepositoryImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return GalaxyRepositoryGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service GalaxyRepository.
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public static final class GalaxyRepositoryStub
      extends io.grpc.stub.AbstractAsyncStub<GalaxyRepositoryStub> {
    private GalaxyRepositoryStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GalaxyRepositoryStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GalaxyRepositoryStub(channel, callOptions);
    }

    /**
     */
    public void testConnection(galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getTestConnectionMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getLastDeployTime(galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetLastDeployTimeMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void discoverHierarchy(galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getDiscoverHierarchyMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * Server-stream of deploy events. The server emits the current state immediately
     * on subscribe (so clients can bootstrap their cache without waiting for the next
     * deploy), then emits one event each time the gateway's hierarchy cache observes
     * a new galaxy.time_of_last_deploy. The sequence field is monotonically
     * increasing per server start; gaps indicate the per-subscriber buffer dropped
     * older events because the client was too slow.
     * </pre>
     */
    public void watchDeployEvents(galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getWatchDeployEventsMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * Returns the direct children of a parent object (or the root objects when
     * `parent` is unset). Designed for OPC UA-style lazy expand: clients walk
     * one level at a time instead of paging the full hierarchy. Filters mirror
     * DiscoverHierarchy exactly. Backed by the same shared hierarchy cache.
     * </pre>
     */
    public void browseChildren(galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest request,
        io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getBrowseChildrenMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service GalaxyRepository.
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public static final class GalaxyRepositoryBlockingV2Stub
      extends io.grpc.stub.AbstractBlockingStub<GalaxyRepositoryBlockingV2Stub> {
    private GalaxyRepositoryBlockingV2Stub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GalaxyRepositoryBlockingV2Stub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GalaxyRepositoryBlockingV2Stub(channel, callOptions);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply testConnection(galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest request) throws io.grpc.StatusException {
      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
          getChannel(), getTestConnectionMethod(), getCallOptions(), request);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply getLastDeployTime(galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest request) throws io.grpc.StatusException {
      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
          getChannel(), getGetLastDeployTimeMethod(), getCallOptions(), request);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply discoverHierarchy(galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest request) throws io.grpc.StatusException {
      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
          getChannel(), getDiscoverHierarchyMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * Server-stream of deploy events. The server emits the current state immediately
     * on subscribe (so clients can bootstrap their cache without waiting for the next
     * deploy), then emits one event each time the gateway's hierarchy cache observes
     * a new galaxy.time_of_last_deploy. The sequence field is monotonically
     * increasing per server start; gaps indicate the per-subscriber buffer dropped
     * older events because the client was too slow.
     * </pre>
     */
    @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
    public io.grpc.stub.BlockingClientCall<?, galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent>
        watchDeployEvents(galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest request) {
      return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall(
          getChannel(), getWatchDeployEventsMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * Returns the direct children of a parent object (or the root objects when
     * `parent` is unset). Designed for OPC UA-style lazy expand: clients walk
     * one level at a time instead of paging the full hierarchy. Filters mirror
     * DiscoverHierarchy exactly. Backed by the same shared hierarchy cache.
     * </pre>
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply browseChildren(galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest request) throws io.grpc.StatusException {
      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
          getChannel(), getBrowseChildrenMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do limited synchronous rpc calls to service GalaxyRepository.
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public static final class GalaxyRepositoryBlockingStub
      extends io.grpc.stub.AbstractBlockingStub<GalaxyRepositoryBlockingStub> {
    private GalaxyRepositoryBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GalaxyRepositoryBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GalaxyRepositoryBlockingStub(channel, callOptions);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply testConnection(galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getTestConnectionMethod(), getCallOptions(), request);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply getLastDeployTime(galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetLastDeployTimeMethod(), getCallOptions(), request);
    }

    /**
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply discoverHierarchy(galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getDiscoverHierarchyMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * Server-stream of deploy events. The server emits the current state immediately
     * on subscribe (so clients can bootstrap their cache without waiting for the next
     * deploy), then emits one event each time the gateway's hierarchy cache observes
     * a new galaxy.time_of_last_deploy. The sequence field is monotonically
     * increasing per server start; gaps indicate the per-subscriber buffer dropped
     * older events because the client was too slow.
     * </pre>
     */
    public java.util.Iterator<galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent> watchDeployEvents(
        galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getWatchDeployEventsMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * Returns the direct children of a parent object (or the root objects when
     * `parent` is unset). Designed for OPC UA-style lazy expand: clients walk
     * one level at a time instead of paging the full hierarchy. Filters mirror
     * DiscoverHierarchy exactly. Backed by the same shared hierarchy cache.
     * </pre>
     */
    public galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply browseChildren(galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getBrowseChildrenMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service GalaxyRepository.
   * <pre>
   * Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
   * database). Lets clients enumerate the deployed object hierarchy and each
   * object's dynamic attributes so they know what tag references to subscribe
   * to via the MxAccessGateway service.
   * </pre>
   */
  public static final class GalaxyRepositoryFutureStub
      extends io.grpc.stub.AbstractFutureStub<GalaxyRepositoryFutureStub> {
    private GalaxyRepositoryFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GalaxyRepositoryFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GalaxyRepositoryFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply> testConnection(
        galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getTestConnectionMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply> getLastDeployTime(
        galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetLastDeployTimeMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply> discoverHierarchy(
        galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getDiscoverHierarchyMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * Returns the direct children of a parent object (or the root objects when
     * `parent` is unset). Designed for OPC UA-style lazy expand: clients walk
     * one level at a time instead of paging the full hierarchy. Filters mirror
     * DiscoverHierarchy exactly. Backed by the same shared hierarchy cache.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply> browseChildren(
        galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getBrowseChildrenMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_TEST_CONNECTION = 0;
  private static final int METHODID_GET_LAST_DEPLOY_TIME = 1;
  private static final int METHODID_DISCOVER_HIERARCHY = 2;
  private static final int METHODID_WATCH_DEPLOY_EVENTS = 3;
  private static final int METHODID_BROWSE_CHILDREN = 4;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_TEST_CONNECTION:
          serviceImpl.testConnection((galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest) request,
              (io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply>) responseObserver);
          break;
        case METHODID_GET_LAST_DEPLOY_TIME:
          serviceImpl.getLastDeployTime((galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest) request,
              (io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply>) responseObserver);
          break;
        case METHODID_DISCOVER_HIERARCHY:
          serviceImpl.discoverHierarchy((galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest) request,
              (io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply>) responseObserver);
          break;
        case METHODID_WATCH_DEPLOY_EVENTS:
          serviceImpl.watchDeployEvents((galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest) request,
              (io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent>) responseObserver);
          break;
        case METHODID_BROWSE_CHILDREN:
          serviceImpl.browseChildren((galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest) request,
              (io.grpc.stub.StreamObserver<galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getTestConnectionMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionRequest,
              galaxy_repository.v1.GalaxyRepositoryOuterClass.TestConnectionReply>(
                service, METHODID_TEST_CONNECTION)))
        .addMethod(
          getGetLastDeployTimeMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeRequest,
              galaxy_repository.v1.GalaxyRepositoryOuterClass.GetLastDeployTimeReply>(
                service, METHODID_GET_LAST_DEPLOY_TIME)))
        .addMethod(
          getDiscoverHierarchyMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyRequest,
              galaxy_repository.v1.GalaxyRepositoryOuterClass.DiscoverHierarchyReply>(
                service, METHODID_DISCOVER_HIERARCHY)))
        .addMethod(
          getWatchDeployEventsMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              galaxy_repository.v1.GalaxyRepositoryOuterClass.WatchDeployEventsRequest,
              galaxy_repository.v1.GalaxyRepositoryOuterClass.DeployEvent>(
                service, METHODID_WATCH_DEPLOY_EVENTS)))
        .addMethod(
          getBrowseChildrenMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenRequest,
              galaxy_repository.v1.GalaxyRepositoryOuterClass.BrowseChildrenReply>(
                service, METHODID_BROWSE_CHILDREN)))
        .build();
  }

  private static abstract class GalaxyRepositoryBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    GalaxyRepositoryBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return galaxy_repository.v1.GalaxyRepositoryOuterClass.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("GalaxyRepository");
    }
  }

  private static final class GalaxyRepositoryFileDescriptorSupplier
      extends GalaxyRepositoryBaseDescriptorSupplier {
    GalaxyRepositoryFileDescriptorSupplier() {}
  }

  private static final class GalaxyRepositoryMethodDescriptorSupplier
      extends GalaxyRepositoryBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    GalaxyRepositoryMethodDescriptorSupplier(java.lang.String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (GalaxyRepositoryGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new GalaxyRepositoryFileDescriptorSupplier())
              .addMethod(getTestConnectionMethod())
              .addMethod(getGetLastDeployTimeMethod())
              .addMethod(getDiscoverHierarchyMethod())
              .addMethod(getWatchDeployEventsMethod())
              .addMethod(getBrowseChildrenMethod())
              .build();
        }
      }
    }
    return result;
  }
}
