diff --git a/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryServiceGrpc.java b/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryServiceGrpc.java new file mode 100644 index 0000000000..4e99d8dc79 --- /dev/null +++ b/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryServiceGrpc.java @@ -0,0 +1,369 @@ +package io.grpc.xds.shaded.envoy.service.discovery.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * See https://github.com/lyft/envoy-api#apis for a description of the role of
+ * ADS and how it is intended to be used by a management server. ADS requests
+ * have the same structure as their singleton xDS counterparts, but can
+ * multiplex many resource types on a single stream. The type_url in the
+ * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+ * the multiplexed singleton APIs at the Envoy instance and management server.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: envoy/service/discovery/v2/ads.proto") +public final class AggregatedDiscoveryServiceGrpc { + + private AggregatedDiscoveryServiceGrpc() {} + + public static final String SERVICE_NAME = "envoy.service.discovery.v2.AggregatedDiscoveryService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getStreamAggregatedResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamAggregatedResources", + requestType = io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest.class, + responseType = io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getStreamAggregatedResourcesMethod() { + io.grpc.MethodDescriptor getStreamAggregatedResourcesMethod; + if ((getStreamAggregatedResourcesMethod = AggregatedDiscoveryServiceGrpc.getStreamAggregatedResourcesMethod) == null) { + synchronized (AggregatedDiscoveryServiceGrpc.class) { + if ((getStreamAggregatedResourcesMethod = AggregatedDiscoveryServiceGrpc.getStreamAggregatedResourcesMethod) == null) { + AggregatedDiscoveryServiceGrpc.getStreamAggregatedResourcesMethod = getStreamAggregatedResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName( + "envoy.service.discovery.v2.AggregatedDiscoveryService", "StreamAggregatedResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance())) + .setSchemaDescriptor(new AggregatedDiscoveryServiceMethodDescriptorSupplier("StreamAggregatedResources")) + .build(); + } + } + } + return getStreamAggregatedResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor getIncrementalAggregatedResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "IncrementalAggregatedResources", + requestType = io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest.class, + responseType = io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getIncrementalAggregatedResourcesMethod() { + io.grpc.MethodDescriptor getIncrementalAggregatedResourcesMethod; + if ((getIncrementalAggregatedResourcesMethod = AggregatedDiscoveryServiceGrpc.getIncrementalAggregatedResourcesMethod) == null) { + synchronized (AggregatedDiscoveryServiceGrpc.class) { + if ((getIncrementalAggregatedResourcesMethod = AggregatedDiscoveryServiceGrpc.getIncrementalAggregatedResourcesMethod) == null) { + AggregatedDiscoveryServiceGrpc.getIncrementalAggregatedResourcesMethod = getIncrementalAggregatedResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName( + "envoy.service.discovery.v2.AggregatedDiscoveryService", "IncrementalAggregatedResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance())) + .setSchemaDescriptor(new AggregatedDiscoveryServiceMethodDescriptorSupplier("IncrementalAggregatedResources")) + .build(); + } + } + } + return getIncrementalAggregatedResourcesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static AggregatedDiscoveryServiceStub newStub(io.grpc.Channel channel) { + return new AggregatedDiscoveryServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AggregatedDiscoveryServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new AggregatedDiscoveryServiceBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static AggregatedDiscoveryServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + return new AggregatedDiscoveryServiceFutureStub(channel); + } + + /** + *
+   * See https://github.com/lyft/envoy-api#apis for a description of the role of
+   * ADS and how it is intended to be used by a management server. ADS requests
+   * have the same structure as their singleton xDS counterparts, but can
+   * multiplex many resource types on a single stream. The type_url in the
+   * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+   * the multiplexed singleton APIs at the Envoy instance and management server.
+   * 
+ */ + public static abstract class AggregatedDiscoveryServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * This is a gRPC-only API.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamAggregatedResources( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getStreamAggregatedResourcesMethod(), responseObserver); + } + + /** + */ + public io.grpc.stub.StreamObserver incrementalAggregatedResources( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getIncrementalAggregatedResourcesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamAggregatedResourcesMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse>( + this, METHODID_STREAM_AGGREGATED_RESOURCES))) + .addMethod( + getIncrementalAggregatedResourcesMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse>( + this, METHODID_INCREMENTAL_AGGREGATED_RESOURCES))) + .build(); + } + } + + /** + *
+   * See https://github.com/lyft/envoy-api#apis for a description of the role of
+   * ADS and how it is intended to be used by a management server. ADS requests
+   * have the same structure as their singleton xDS counterparts, but can
+   * multiplex many resource types on a single stream. The type_url in the
+   * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+   * the multiplexed singleton APIs at the Envoy instance and management server.
+   * 
+ */ + public static final class AggregatedDiscoveryServiceStub extends io.grpc.stub.AbstractStub { + private AggregatedDiscoveryServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private AggregatedDiscoveryServiceStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AggregatedDiscoveryServiceStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new AggregatedDiscoveryServiceStub(channel, callOptions); + } + + /** + *
+     * This is a gRPC-only API.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamAggregatedResources( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getStreamAggregatedResourcesMethod(), getCallOptions()), responseObserver); + } + + /** + */ + public io.grpc.stub.StreamObserver incrementalAggregatedResources( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getIncrementalAggregatedResourcesMethod(), getCallOptions()), responseObserver); + } + } + + /** + *
+   * See https://github.com/lyft/envoy-api#apis for a description of the role of
+   * ADS and how it is intended to be used by a management server. ADS requests
+   * have the same structure as their singleton xDS counterparts, but can
+   * multiplex many resource types on a single stream. The type_url in the
+   * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+   * the multiplexed singleton APIs at the Envoy instance and management server.
+   * 
+ */ + public static final class AggregatedDiscoveryServiceBlockingStub extends io.grpc.stub.AbstractStub { + private AggregatedDiscoveryServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private AggregatedDiscoveryServiceBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AggregatedDiscoveryServiceBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new AggregatedDiscoveryServiceBlockingStub(channel, callOptions); + } + } + + /** + *
+   * See https://github.com/lyft/envoy-api#apis for a description of the role of
+   * ADS and how it is intended to be used by a management server. ADS requests
+   * have the same structure as their singleton xDS counterparts, but can
+   * multiplex many resource types on a single stream. The type_url in the
+   * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+   * the multiplexed singleton APIs at the Envoy instance and management server.
+   * 
+ */ + public static final class AggregatedDiscoveryServiceFutureStub extends io.grpc.stub.AbstractStub { + private AggregatedDiscoveryServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private AggregatedDiscoveryServiceFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AggregatedDiscoveryServiceFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new AggregatedDiscoveryServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAM_AGGREGATED_RESOURCES = 0; + private static final int METHODID_INCREMENTAL_AGGREGATED_RESOURCES = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AggregatedDiscoveryServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AggregatedDiscoveryServiceImplBase 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 responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAM_AGGREGATED_RESOURCES: + return (io.grpc.stub.StreamObserver) serviceImpl.streamAggregatedResources( + (io.grpc.stub.StreamObserver) responseObserver); + case METHODID_INCREMENTAL_AGGREGATED_RESOURCES: + return (io.grpc.stub.StreamObserver) serviceImpl.incrementalAggregatedResources( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class AggregatedDiscoveryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AggregatedDiscoveryServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AggregatedDiscoveryService"); + } + } + + private static final class AggregatedDiscoveryServiceFileDescriptorSupplier + extends AggregatedDiscoveryServiceBaseDescriptorSupplier { + AggregatedDiscoveryServiceFileDescriptorSupplier() {} + } + + private static final class AggregatedDiscoveryServiceMethodDescriptorSupplier + extends AggregatedDiscoveryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AggregatedDiscoveryServiceMethodDescriptorSupplier(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 (AggregatedDiscoveryServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AggregatedDiscoveryServiceFileDescriptorSupplier()) + .addMethod(getStreamAggregatedResourcesMethod()) + .addMethod(getIncrementalAggregatedResourcesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingServiceGrpc.java b/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingServiceGrpc.java new file mode 100644 index 0000000000..f4267c84ba --- /dev/null +++ b/xds/src/generated/main/grpc/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingServiceGrpc.java @@ -0,0 +1,322 @@ +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: envoy/service/load_stats/v2/lrs.proto") +public final class LoadReportingServiceGrpc { + + private LoadReportingServiceGrpc() {} + + public static final String SERVICE_NAME = "envoy.service.load_stats.v2.LoadReportingService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getStreamLoadStatsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamLoadStats", + requestType = io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.class, + responseType = io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getStreamLoadStatsMethod() { + io.grpc.MethodDescriptor getStreamLoadStatsMethod; + if ((getStreamLoadStatsMethod = LoadReportingServiceGrpc.getStreamLoadStatsMethod) == null) { + synchronized (LoadReportingServiceGrpc.class) { + if ((getStreamLoadStatsMethod = LoadReportingServiceGrpc.getStreamLoadStatsMethod) == null) { + LoadReportingServiceGrpc.getStreamLoadStatsMethod = getStreamLoadStatsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName( + "envoy.service.load_stats.v2.LoadReportingService", "StreamLoadStats")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance())) + .setSchemaDescriptor(new LoadReportingServiceMethodDescriptorSupplier("StreamLoadStats")) + .build(); + } + } + } + return getStreamLoadStatsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static LoadReportingServiceStub newStub(io.grpc.Channel channel) { + return new LoadReportingServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LoadReportingServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new LoadReportingServiceBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static LoadReportingServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + return new LoadReportingServiceFutureStub(channel); + } + + /** + */ + public static abstract class LoadReportingServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * Advanced API to allow for multi-dimensional load balancing by remote
+     * server. For receiving LB assignments, the steps are:
+     * 1, The management server is configured with per cluster/zone/load metric
+     *    capacity configuration. The capacity configuration definition is
+     *    outside of the scope of this document.
+     * 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+     *    to balance.
+     * Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+     * management server:
+     * 1. Once a connection establishes, the management server publishes a
+     *    LoadStatsResponse for all clusters it is interested in learning load
+     *    stats about.
+     * 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+     *    based on per-zone weights and/or per-instance weights (if specified)
+     *    based on intra-zone LbPolicy. This information comes from the above
+     *    {Stream,Fetch}Endpoints.
+     * 3. When upstream hosts reply, they optionally add header <define header
+     *    name> with ASCII representation of EndpointLoadMetricStats.
+     * 4. Envoy aggregates load reports over the period of time given to it in
+     *    LoadStatsResponse.load_reporting_interval. This includes aggregation
+     *    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+     *    well as load metrics from upstream hosts.
+     * 5. When the timer of load_reporting_interval expires, Envoy sends new
+     *    LoadStatsRequest filled with load reports for each cluster.
+     * 6. The management server uses the load reports from all reported Envoys
+     *    from around the world, computes global assignment and prepares traffic
+     *    assignment destined for each zone Envoys are located in. Goto 2.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamLoadStats( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getStreamLoadStatsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamLoadStatsMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse>( + this, METHODID_STREAM_LOAD_STATS))) + .build(); + } + } + + /** + */ + public static final class LoadReportingServiceStub extends io.grpc.stub.AbstractStub { + private LoadReportingServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private LoadReportingServiceStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LoadReportingServiceStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new LoadReportingServiceStub(channel, callOptions); + } + + /** + *
+     * Advanced API to allow for multi-dimensional load balancing by remote
+     * server. For receiving LB assignments, the steps are:
+     * 1, The management server is configured with per cluster/zone/load metric
+     *    capacity configuration. The capacity configuration definition is
+     *    outside of the scope of this document.
+     * 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+     *    to balance.
+     * Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+     * management server:
+     * 1. Once a connection establishes, the management server publishes a
+     *    LoadStatsResponse for all clusters it is interested in learning load
+     *    stats about.
+     * 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+     *    based on per-zone weights and/or per-instance weights (if specified)
+     *    based on intra-zone LbPolicy. This information comes from the above
+     *    {Stream,Fetch}Endpoints.
+     * 3. When upstream hosts reply, they optionally add header <define header
+     *    name> with ASCII representation of EndpointLoadMetricStats.
+     * 4. Envoy aggregates load reports over the period of time given to it in
+     *    LoadStatsResponse.load_reporting_interval. This includes aggregation
+     *    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+     *    well as load metrics from upstream hosts.
+     * 5. When the timer of load_reporting_interval expires, Envoy sends new
+     *    LoadStatsRequest filled with load reports for each cluster.
+     * 6. The management server uses the load reports from all reported Envoys
+     *    from around the world, computes global assignment and prepares traffic
+     *    assignment destined for each zone Envoys are located in. Goto 2.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamLoadStats( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getStreamLoadStatsMethod(), getCallOptions()), responseObserver); + } + } + + /** + */ + public static final class LoadReportingServiceBlockingStub extends io.grpc.stub.AbstractStub { + private LoadReportingServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private LoadReportingServiceBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LoadReportingServiceBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new LoadReportingServiceBlockingStub(channel, callOptions); + } + } + + /** + */ + public static final class LoadReportingServiceFutureStub extends io.grpc.stub.AbstractStub { + private LoadReportingServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private LoadReportingServiceFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LoadReportingServiceFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new LoadReportingServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAM_LOAD_STATS = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final LoadReportingServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(LoadReportingServiceImplBase 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 responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAM_LOAD_STATS: + return (io.grpc.stub.StreamObserver) serviceImpl.streamLoadStats( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class LoadReportingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LoadReportingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LoadReportingService"); + } + } + + private static final class LoadReportingServiceFileDescriptorSupplier + extends LoadReportingServiceBaseDescriptorSupplier { + LoadReportingServiceFileDescriptorSupplier() {} + } + + private static final class LoadReportingServiceMethodDescriptorSupplier + extends LoadReportingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + LoadReportingServiceMethodDescriptorSupplier(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 (LoadReportingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LoadReportingServiceFileDescriptorSupplier()) + .addMethod(getStreamLoadStatsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/ClusterLoadAssignment.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/ClusterLoadAssignment.java index 6c93ec999c..acaa8e3565 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/ClusterLoadAssignment.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/ClusterLoadAssignment.java @@ -242,7 +242,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -258,7 +260,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -274,7 +278,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -1334,7 +1340,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -1352,7 +1360,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -1370,7 +1380,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2315,7 +2327,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2333,7 +2347,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2355,7 +2371,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2383,7 +2401,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2409,7 +2429,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2439,7 +2461,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2465,7 +2489,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2485,7 +2511,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * @@ -2508,7 +2536,9 @@ private static final long serialVersionUID = 0L; * multiplied by the overprovisioning factor drops below 100. * With the default value 140(1.4), Envoy doesn't consider a priority level * or a locality unhealthy until their percentage of healthy hosts drops - * below 72%. + * below 72%. For example: + * .. code-block:: json + * { "overprovisioning_factor": 100 } * Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and * :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`. * diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/Cert.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/Cert.java index 48add1b6e2..b173fa1353 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/Cert.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/Cert.java @@ -106,50 +106,51 @@ public final class Cert { "estamp\030\006 \001(\0132\032.google.protobuf.BoolValue" + "\022*\n\003crl\030\007 \001(\0132\035.envoy.api.v2.core.DataSo" + "urce\022!\n\031allow_expired_certificate\030\010 \001(\010\"" + - "\212\006\n\020CommonTlsContext\0224\n\ntls_params\030\001 \001(\013" + + "\226\006\n\020CommonTlsContext\0224\n\ntls_params\030\001 \001(\013" + "2 .envoy.api.v2.auth.TlsParameters\022;\n\020tl" + "s_certificates\030\002 \003(\0132!.envoy.api.v2.auth" + - ".TlsCertificate\022N\n\"tls_certificate_sds_s" + + ".TlsCertificate\022Z\n\"tls_certificate_sds_s" + "ecret_configs\030\006 \003(\0132\".envoy.api.v2.auth." + - "SdsSecretConfig\022M\n\022validation_context\030\003 " + - "\001(\0132/.envoy.api.v2.auth.CertificateValid" + - "ationContextH\000\022R\n$validation_context_sds" + - "_secret_config\030\007 \001(\0132\".envoy.api.v2.auth" + - ".SdsSecretConfigH\000\022o\n\033combined_validatio" + - "n_context\030\010 \001(\0132H.envoy.api.v2.auth.Comm" + - "onTlsContext.CombinedCertificateValidati" + - "onContextH\000\022\026\n\016alpn_protocols\030\004 \003(\t\032\345\001\n$" + - "CombinedCertificateValidationContext\022_\n\032" + - "default_validation_context\030\001 \001(\0132/.envoy" + - ".api.v2.auth.CertificateValidationContex" + - "tB\n\272\351\300\003\005\212\001\002\020\001\022\\\n$validation_context_sds_" + - "secret_config\030\002 \001(\0132\".envoy.api.v2.auth." + - "SdsSecretConfigB\n\272\351\300\003\005\212\001\002\020\001B\031\n\027validatio" + - "n_context_typeJ\004\010\005\020\006\"\303\001\n\022UpstreamTlsCont" + - "ext\022?\n\022common_tls_context\030\001 \001(\0132#.envoy." + - "api.v2.auth.CommonTlsContext\022\027\n\003sni\030\002 \001(" + - "\tB\n\272\351\300\003\005r\003(\377\001\022\033\n\023allow_renegotiation\030\003 \001" + - "(\010\0226\n\020max_session_keys\030\004 \001(\0132\034.google.pr" + - "otobuf.UInt32Value\"\201\003\n\024DownstreamTlsCont" + - "ext\022?\n\022common_tls_context\030\001 \001(\0132#.envoy." + - "api.v2.auth.CommonTlsContext\022>\n\032require_" + - "client_certificate\030\002 \001(\0132\032.google.protob" + - "uf.BoolValue\022/\n\013require_sni\030\003 \001(\0132\032.goog" + - "le.protobuf.BoolValue\022F\n\023session_ticket_" + - "keys\030\004 \001(\0132\'.envoy.api.v2.auth.TlsSessio" + - "nTicketKeysH\000\022S\n%session_ticket_keys_sds" + - "_secret_config\030\005 \001(\0132\".envoy.api.v2.auth" + - ".SdsSecretConfigH\000B\032\n\030session_ticket_key" + - "s_type\"T\n\017SdsSecretConfig\022\014\n\004name\030\001 \001(\t\022" + - "3\n\nsds_config\030\002 \001(\0132\037.envoy.api.v2.core." + - "ConfigSource\"\363\001\n\006Secret\022\014\n\004name\030\001 \001(\t\022<\n" + - "\017tls_certificate\030\002 \001(\0132!.envoy.api.v2.au" + - "th.TlsCertificateH\000\022F\n\023session_ticket_ke" + - "ys\030\003 \001(\0132\'.envoy.api.v2.auth.TlsSessionT" + - "icketKeysH\000\022M\n\022validation_context\030\004 \001(\0132" + - "/.envoy.api.v2.auth.CertificateValidatio" + - "nContextH\000B\006\n\004typeB.\n$io.grpc.xds.shaded" + - ".envoy.api.v2.authP\001Z\004authb\006proto3" + "SdsSecretConfigB\n\272\351\300\003\005\222\001\002\020\001\022M\n\022validatio" + + "n_context\030\003 \001(\0132/.envoy.api.v2.auth.Cert" + + "ificateValidationContextH\000\022R\n$validation" + + "_context_sds_secret_config\030\007 \001(\0132\".envoy" + + ".api.v2.auth.SdsSecretConfigH\000\022o\n\033combin" + + "ed_validation_context\030\010 \001(\0132H.envoy.api." + + "v2.auth.CommonTlsContext.CombinedCertifi" + + "cateValidationContextH\000\022\026\n\016alpn_protocol" + + "s\030\004 \003(\t\032\345\001\n$CombinedCertificateValidatio" + + "nContext\022_\n\032default_validation_context\030\001" + + " \001(\0132/.envoy.api.v2.auth.CertificateVali" + + "dationContextB\n\272\351\300\003\005\212\001\002\020\001\022\\\n$validation_" + + "context_sds_secret_config\030\002 \001(\0132\".envoy." + + "api.v2.auth.SdsSecretConfigB\n\272\351\300\003\005\212\001\002\020\001B" + + "\031\n\027validation_context_typeJ\004\010\005\020\006\"\303\001\n\022Ups" + + "treamTlsContext\022?\n\022common_tls_context\030\001 " + + "\001(\0132#.envoy.api.v2.auth.CommonTlsContext" + + "\022\027\n\003sni\030\002 \001(\tB\n\272\351\300\003\005r\003(\377\001\022\033\n\023allow_reneg" + + "otiation\030\003 \001(\010\0226\n\020max_session_keys\030\004 \001(\013" + + "2\034.google.protobuf.UInt32Value\"\201\003\n\024Downs" + + "treamTlsContext\022?\n\022common_tls_context\030\001 " + + "\001(\0132#.envoy.api.v2.auth.CommonTlsContext" + + "\022>\n\032require_client_certificate\030\002 \001(\0132\032.g" + + "oogle.protobuf.BoolValue\022/\n\013require_sni\030" + + "\003 \001(\0132\032.google.protobuf.BoolValue\022F\n\023ses" + + "sion_ticket_keys\030\004 \001(\0132\'.envoy.api.v2.au" + + "th.TlsSessionTicketKeysH\000\022S\n%session_tic" + + "ket_keys_sds_secret_config\030\005 \001(\0132\".envoy" + + ".api.v2.auth.SdsSecretConfigH\000B\032\n\030sessio" + + "n_ticket_keys_type\"T\n\017SdsSecretConfig\022\014\n" + + "\004name\030\001 \001(\t\0223\n\nsds_config\030\002 \001(\0132\037.envoy." + + "api.v2.core.ConfigSource\"\363\001\n\006Secret\022\014\n\004n" + + "ame\030\001 \001(\t\022<\n\017tls_certificate\030\002 \001(\0132!.env" + + "oy.api.v2.auth.TlsCertificateH\000\022F\n\023sessi" + + "on_ticket_keys\030\003 \001(\0132\'.envoy.api.v2.auth" + + ".TlsSessionTicketKeysH\000\022M\n\022validation_co" + + "ntext\030\004 \001(\0132/.envoy.api.v2.auth.Certific" + + "ateValidationContextH\000B\006\n\004typeB.\n$io.grp" + + "c.xds.shaded.envoy.api.v2.authP\001Z\004authb\006" + + "proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContext.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContext.java index da8146f2b9..22b20826a4 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContext.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContext.java @@ -1145,8 +1145,8 @@ private static final long serialVersionUID = 0L; private java.util.List tlsCertificates_; /** *
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -1159,8 +1159,8 @@ private static final long serialVersionUID = 0L;
   }
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -1174,8 +1174,8 @@ private static final long serialVersionUID = 0L;
   }
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -1188,8 +1188,8 @@ private static final long serialVersionUID = 0L;
   }
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -1202,8 +1202,8 @@ private static final long serialVersionUID = 0L;
   }
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -1223,7 +1223,7 @@ private static final long serialVersionUID = 0L;
    * Configs for fetching TLS certificates via SDS API.
    * 
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public java.util.List getTlsCertificateSdsSecretConfigsList() { return tlsCertificateSdsSecretConfigs_; @@ -1233,7 +1233,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public java.util.List getTlsCertificateSdsSecretConfigsOrBuilderList() { @@ -1244,7 +1244,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public int getTlsCertificateSdsSecretConfigsCount() { return tlsCertificateSdsSecretConfigs_.size(); @@ -1254,7 +1254,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig getTlsCertificateSdsSecretConfigs(int index) { return tlsCertificateSdsSecretConfigs_.get(index); @@ -1264,7 +1264,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfigOrBuilder getTlsCertificateSdsSecretConfigsOrBuilder( int index) { @@ -2203,8 +2203,8 @@ private static final long serialVersionUID = 0L; /** *
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2221,8 +2221,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2239,8 +2239,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2257,8 +2257,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2282,8 +2282,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2304,8 +2304,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2328,8 +2328,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2353,8 +2353,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2375,8 +2375,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2397,8 +2397,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2420,8 +2420,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2441,8 +2441,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2462,8 +2462,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2477,8 +2477,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2495,8 +2495,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2514,8 +2514,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2529,8 +2529,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2545,8 +2545,8 @@ private static final long serialVersionUID = 0L;
     }
     /**
      * 
-     * Multiple TLS certificates can be associated with the same context.
-     * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+     * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+     * same context to allow both RSA and ECDSA certificates.
      * Only a single TLS certificate is supported in client contexts. In server contexts, the first
      * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
      * used for clients that support ECDSA.
@@ -2590,7 +2590,7 @@ private static final long serialVersionUID = 0L;
      * Configs for fetching TLS certificates via SDS API.
      * 
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public java.util.List getTlsCertificateSdsSecretConfigsList() { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2604,7 +2604,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public int getTlsCertificateSdsSecretConfigsCount() { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2618,7 +2618,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig getTlsCertificateSdsSecretConfigs(int index) { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2632,7 +2632,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder setTlsCertificateSdsSecretConfigs( int index, io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig value) { @@ -2653,7 +2653,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder setTlsCertificateSdsSecretConfigs( int index, io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder builderForValue) { @@ -2671,7 +2671,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder addTlsCertificateSdsSecretConfigs(io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig value) { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2691,7 +2691,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder addTlsCertificateSdsSecretConfigs( int index, io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig value) { @@ -2712,7 +2712,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder addTlsCertificateSdsSecretConfigs( io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder builderForValue) { @@ -2730,7 +2730,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder addTlsCertificateSdsSecretConfigs( int index, io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder builderForValue) { @@ -2748,7 +2748,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder addAllTlsCertificateSdsSecretConfigs( java.lang.Iterable values) { @@ -2767,7 +2767,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder clearTlsCertificateSdsSecretConfigs() { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2784,7 +2784,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public Builder removeTlsCertificateSdsSecretConfigs(int index) { if (tlsCertificateSdsSecretConfigsBuilder_ == null) { @@ -2801,7 +2801,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder getTlsCertificateSdsSecretConfigsBuilder( int index) { @@ -2812,7 +2812,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfigOrBuilder getTlsCertificateSdsSecretConfigsOrBuilder( int index) { @@ -2826,7 +2826,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public java.util.List getTlsCertificateSdsSecretConfigsOrBuilderList() { @@ -2841,7 +2841,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder addTlsCertificateSdsSecretConfigsBuilder() { return getTlsCertificateSdsSecretConfigsFieldBuilder().addBuilder( @@ -2852,7 +2852,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig.Builder addTlsCertificateSdsSecretConfigsBuilder( int index) { @@ -2864,7 +2864,7 @@ private static final long serialVersionUID = 0L; * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ public java.util.List getTlsCertificateSdsSecretConfigsBuilderList() { diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContextOrBuilder.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContextOrBuilder.java index d0b21aca10..9bd5405196 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContextOrBuilder.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/auth/CommonTlsContextOrBuilder.java @@ -34,8 +34,8 @@ public interface CommonTlsContextOrBuilder extends /** *
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -47,8 +47,8 @@ public interface CommonTlsContextOrBuilder extends
       getTlsCertificatesList();
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -59,8 +59,8 @@ public interface CommonTlsContextOrBuilder extends
   io.grpc.xds.shaded.envoy.api.v2.auth.TlsCertificate getTlsCertificates(int index);
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -71,8 +71,8 @@ public interface CommonTlsContextOrBuilder extends
   int getTlsCertificatesCount();
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -84,8 +84,8 @@ public interface CommonTlsContextOrBuilder extends
       getTlsCertificatesOrBuilderList();
   /**
    * 
-   * Multiple TLS certificates can be associated with the same context.
-   * E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured.
+   * :ref:`Multiple TLS certificates <arch_overview_ssl_cert_select>` can be associated with the
+   * same context to allow both RSA and ECDSA certificates.
    * Only a single TLS certificate is supported in client contexts. In server contexts, the first
    * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is
    * used for clients that support ECDSA.
@@ -101,7 +101,7 @@ public interface CommonTlsContextOrBuilder extends
    * Configs for fetching TLS certificates via SDS API.
    * 
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ java.util.List getTlsCertificateSdsSecretConfigsList(); @@ -110,7 +110,7 @@ public interface CommonTlsContextOrBuilder extends * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfig getTlsCertificateSdsSecretConfigs(int index); /** @@ -118,7 +118,7 @@ public interface CommonTlsContextOrBuilder extends * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ int getTlsCertificateSdsSecretConfigsCount(); /** @@ -126,7 +126,7 @@ public interface CommonTlsContextOrBuilder extends * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ java.util.List getTlsCertificateSdsSecretConfigsOrBuilderList(); @@ -135,7 +135,7 @@ public interface CommonTlsContextOrBuilder extends * Configs for fetching TLS certificates via SDS API. *
* - * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6; + * repeated .envoy.api.v2.auth.SdsSecretConfig tls_certificate_sds_secret_configs = 6 [(.validate.rules) = { ... } */ io.grpc.xds.shaded.envoy.api.v2.auth.SdsSecretConfigOrBuilder getTlsCertificateSdsSecretConfigsOrBuilder( int index); diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheck.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheck.java index b9c62a23f8..da826b9006 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheck.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheck.java @@ -5250,6 +5250,28 @@ private static final long serialVersionUID = 0L; */ com.google.protobuf.ByteString getServiceNameBytes(); + + /** + *
+     * The value of the :authority header in the gRPC health check request. If
+     * left empty (default value), the name of the cluster this health check is associated
+     * with will be used.
+     * 
+ * + * string authority = 2; + */ + java.lang.String getAuthority(); + /** + *
+     * The value of the :authority header in the gRPC health check request. If
+     * left empty (default value), the name of the cluster this health check is associated
+     * with will be used.
+     * 
+ * + * string authority = 2; + */ + com.google.protobuf.ByteString + getAuthorityBytes(); } /** *
@@ -5272,6 +5294,7 @@ private static final long serialVersionUID = 0L;
     }
     private GrpcHealthCheck() {
       serviceName_ = "";
+      authority_ = "";
     }
 
     @java.lang.Override
@@ -5311,6 +5334,12 @@ private static final long serialVersionUID = 0L;
               serviceName_ = s;
               break;
             }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              authority_ = s;
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -5385,6 +5414,52 @@ private static final long serialVersionUID = 0L;
       }
     }
 
+    public static final int AUTHORITY_FIELD_NUMBER = 2;
+    private volatile java.lang.Object authority_;
+    /**
+     * 
+     * The value of the :authority header in the gRPC health check request. If
+     * left empty (default value), the name of the cluster this health check is associated
+     * with will be used.
+     * 
+ * + * string authority = 2; + */ + public java.lang.String getAuthority() { + java.lang.Object ref = authority_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authority_ = s; + return s; + } + } + /** + *
+     * The value of the :authority header in the gRPC health check request. If
+     * left empty (default value), the name of the cluster this health check is associated
+     * with will be used.
+     * 
+ * + * string authority = 2; + */ + public com.google.protobuf.ByteString + getAuthorityBytes() { + java.lang.Object ref = authority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -5400,6 +5475,9 @@ private static final long serialVersionUID = 0L; if (!getServiceNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); } + if (!getAuthorityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authority_); + } unknownFields.writeTo(output); } @@ -5411,6 +5489,9 @@ private static final long serialVersionUID = 0L; if (!getServiceNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); } + if (!getAuthorityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authority_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -5429,6 +5510,8 @@ private static final long serialVersionUID = 0L; boolean result = true; result = result && getServiceName() .equals(other.getServiceName()); + result = result && getAuthority() + .equals(other.getAuthority()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -5442,6 +5525,8 @@ private static final long serialVersionUID = 0L; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getAuthority().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -5580,6 +5665,8 @@ private static final long serialVersionUID = 0L; super.clear(); serviceName_ = ""; + authority_ = ""; + return this; } @@ -5603,6 +5690,7 @@ private static final long serialVersionUID = 0L; public io.grpc.xds.shaded.envoy.api.v2.core.HealthCheck.GrpcHealthCheck buildPartial() { io.grpc.xds.shaded.envoy.api.v2.core.HealthCheck.GrpcHealthCheck result = new io.grpc.xds.shaded.envoy.api.v2.core.HealthCheck.GrpcHealthCheck(this); result.serviceName_ = serviceName_; + result.authority_ = authority_; onBuilt(); return result; } @@ -5648,6 +5736,10 @@ private static final long serialVersionUID = 0L; serviceName_ = other.serviceName_; onChanged(); } + if (!other.getAuthority().isEmpty()) { + authority_ = other.authority_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5783,6 +5875,105 @@ private static final long serialVersionUID = 0L; onChanged(); return this; } + + private java.lang.Object authority_ = ""; + /** + *
+       * The value of the :authority header in the gRPC health check request. If
+       * left empty (default value), the name of the cluster this health check is associated
+       * with will be used.
+       * 
+ * + * string authority = 2; + */ + public java.lang.String getAuthority() { + java.lang.Object ref = authority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The value of the :authority header in the gRPC health check request. If
+       * left empty (default value), the name of the cluster this health check is associated
+       * with will be used.
+       * 
+ * + * string authority = 2; + */ + public com.google.protobuf.ByteString + getAuthorityBytes() { + java.lang.Object ref = authority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The value of the :authority header in the gRPC health check request. If
+       * left empty (default value), the name of the cluster this health check is associated
+       * with will be used.
+       * 
+ * + * string authority = 2; + */ + public Builder setAuthority( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authority_ = value; + onChanged(); + return this; + } + /** + *
+       * The value of the :authority header in the gRPC health check request. If
+       * left empty (default value), the name of the cluster this health check is associated
+       * with will be used.
+       * 
+ * + * string authority = 2; + */ + public Builder clearAuthority() { + + authority_ = getDefaultInstance().getAuthority(); + onChanged(); + return this; + } + /** + *
+       * The value of the :authority header in the gRPC health check request. If
+       * left empty (default value), the name of the cluster this health check is associated
+       * with will be used.
+       * 
+ * + * string authority = 2; + */ + public Builder setAuthorityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authority_ = value; + onChanged(); + return this; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheckOuterClass.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheckOuterClass.java index c71824623d..7fd64a3715 100644 --- a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheckOuterClass.java +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/api/v2/core/HealthCheckOuterClass.java @@ -63,7 +63,7 @@ public final class HealthCheckOuterClass { "e.proto\032\031google/protobuf/any.proto\032\036goog" + "le/protobuf/duration.proto\032\034google/proto" + "buf/struct.proto\032\036google/protobuf/wrappe" + - "rs.proto\032\027validate/validate.proto\"\346\016\n\013He" + + "rs.proto\032\027validate/validate.proto\"\371\016\n\013He" + "althCheck\0228\n\007timeout\030\001 \001(\0132\031.google.prot" + "obuf.DurationB\014\272\351\300\003\007\252\001\004\010\001*\000\0229\n\010interval\030" + "\002 \001(\0132\031.google.protobuf.DurationB\014\272\351\300\003\007\252" + @@ -105,16 +105,17 @@ public final class HealthCheckOuterClass { "envoy.api.v2.core.HealthCheck.Payload\0227\n" + "\007receive\030\002 \003(\0132&.envoy.api.v2.core.Healt" + "hCheck.Payload\032\037\n\020RedisHealthCheck\022\013\n\003ke" + - "y\030\001 \001(\t\032\'\n\017GrpcHealthCheck\022\024\n\014service_na" + - "me\030\001 \001(\t\032\224\001\n\021CustomHealthCheck\022\027\n\004name\030\001" + - " \001(\tB\t\272\351\300\003\004r\002 \001\022)\n\006config\030\002 \001(\0132\027.google" + - ".protobuf.StructH\000\022,\n\014typed_config\030\003 \001(\013" + - "2\024.google.protobuf.AnyH\000B\r\n\013config_typeB" + - "\027\n\016health_checker\022\005\270\351\300\003\001J\004\010\n\020\013R\022redis_he" + - "alth_check*R\n\014HealthStatus\022\013\n\007UNKNOWN\020\000\022" + - "\013\n\007HEALTHY\020\001\022\r\n\tUNHEALTHY\020\002\022\014\n\010DRAINING\020" + - "\003\022\013\n\007TIMEOUT\020\004B(\n$io.grpc.xds.shaded.env" + - "oy.api.v2.coreP\001b\006proto3" + "y\030\001 \001(\t\032:\n\017GrpcHealthCheck\022\024\n\014service_na" + + "me\030\001 \001(\t\022\021\n\tauthority\030\002 \001(\t\032\224\001\n\021CustomHe" + + "althCheck\022\027\n\004name\030\001 \001(\tB\t\272\351\300\003\004r\002 \001\022)\n\006co" + + "nfig\030\002 \001(\0132\027.google.protobuf.StructH\000\022,\n" + + "\014typed_config\030\003 \001(\0132\024.google.protobuf.An" + + "yH\000B\r\n\013config_typeB\027\n\016health_checker\022\005\270\351" + + "\300\003\001J\004\010\n\020\013R\022redis_health_check*R\n\014HealthS" + + "tatus\022\013\n\007UNKNOWN\020\000\022\013\n\007HEALTHY\020\001\022\r\n\tUNHEA" + + "LTHY\020\002\022\014\n\010DRAINING\020\003\022\013\n\007TIMEOUT\020\004B(\n$io." + + "grpc.xds.shaded.envoy.api.v2.coreP\001b\006pro" + + "to3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -169,7 +170,7 @@ public final class HealthCheckOuterClass { internal_static_envoy_api_v2_core_HealthCheck_GrpcHealthCheck_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_envoy_api_v2_core_HealthCheck_GrpcHealthCheck_descriptor, - new java.lang.String[] { "ServiceName", }); + new java.lang.String[] { "ServiceName", "Authority", }); internal_static_envoy_api_v2_core_HealthCheck_CustomHealthCheck_descriptor = internal_static_envoy_api_v2_core_HealthCheck_descriptor.getNestedTypes().get(5); internal_static_envoy_api_v2_core_HealthCheck_CustomHealthCheck_fieldAccessorTable = new diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/Ads.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/Ads.java new file mode 100644 index 0000000000..f273bfc060 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/Ads.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/discovery/v2/ads.proto + +package io.grpc.xds.shaded.envoy.service.discovery.v2; + +public final class Ads { + private Ads() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_envoy_service_discovery_v2_AdsDummy_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_envoy_service_discovery_v2_AdsDummy_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$envoy/service/discovery/v2/ads.proto\022\032" + + "envoy.service.discovery.v2\032\034envoy/api/v2" + + "/discovery.proto\"\n\n\010AdsDummy2\377\001\n\032Aggrega" + + "tedDiscoveryService\022b\n\031StreamAggregatedR" + + "esources\022\036.envoy.api.v2.DiscoveryRequest" + + "\032\037.envoy.api.v2.DiscoveryResponse\"\000(\0010\001\022" + + "}\n\036IncrementalAggregatedResources\022).envo" + + "y.api.v2.IncrementalDiscoveryRequest\032*.e" + + "nvoy.api.v2.IncrementalDiscoveryResponse" + + "\"\000(\0010\001B8\n-io.grpc.xds.shaded.envoy.servi" + + "ce.discovery.v2P\001Z\002v2\210\001\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grpc.xds.shaded.envoy.api.v2.Discovery.getDescriptor(), + }, assigner); + internal_static_envoy_service_discovery_v2_AdsDummy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_envoy_service_discovery_v2_AdsDummy_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_envoy_service_discovery_v2_AdsDummy_descriptor, + new java.lang.String[] { }); + io.grpc.xds.shaded.envoy.api.v2.Discovery.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummy.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummy.java new file mode 100644 index 0000000000..8706e8ea33 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummy.java @@ -0,0 +1,398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/discovery/v2/ads.proto + +package io.grpc.xds.shaded.envoy.service.discovery.v2; + +/** + *
+ * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
+ * services: https://github.com/google/protobuf/issues/4221
+ * 
+ * + * Protobuf type {@code envoy.service.discovery.v2.AdsDummy} + */ +public final class AdsDummy extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:envoy.service.discovery.v2.AdsDummy) + AdsDummyOrBuilder { +private static final long serialVersionUID = 0L; + // Use AdsDummy.newBuilder() to construct. + private AdsDummy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AdsDummy() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AdsDummy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.internal_static_envoy_service_discovery_v2_AdsDummy_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.internal_static_envoy_service_discovery_v2_AdsDummy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.class, io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy)) { + return super.equals(obj); + } + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy other = (io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
+   * services: https://github.com/google/protobuf/issues/4221
+   * 
+ * + * Protobuf type {@code envoy.service.discovery.v2.AdsDummy} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:envoy.service.discovery.v2.AdsDummy) + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.internal_static_envoy_service_discovery_v2_AdsDummy_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.internal_static_envoy_service_discovery_v2_AdsDummy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.class, io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.Builder.class); + } + + // Construct using io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.internal_static_envoy_service_discovery_v2_AdsDummy_descriptor; + } + + public io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy getDefaultInstanceForType() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.getDefaultInstance(); + } + + public io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy build() { + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy buildPartial() { + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy result = new io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy) { + return mergeFrom((io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy other) { + if (other == io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:envoy.service.discovery.v2.AdsDummy) + } + + // @@protoc_insertion_point(class_scope:envoy.service.discovery.v2.AdsDummy) + private static final io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy(); + } + + public static io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AdsDummy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AdsDummy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.xds.shaded.envoy.service.discovery.v2.AdsDummy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummyOrBuilder.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummyOrBuilder.java new file mode 100644 index 0000000000..38c4a8738c --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AdsDummyOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/discovery/v2/ads.proto + +package io.grpc.xds.shaded.envoy.service.discovery.v2; + +public interface AdsDummyOrBuilder extends + // @@protoc_insertion_point(interface_extends:envoy.service.discovery.v2.AdsDummy) + com.google.protobuf.MessageOrBuilder { +} diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryService.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryService.java new file mode 100644 index 0000000000..ce204c0217 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/discovery/v2/AggregatedDiscoveryService.java @@ -0,0 +1,325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/discovery/v2/ads.proto + +package io.grpc.xds.shaded.envoy.service.discovery.v2; + +/** + *
+ * See https://github.com/lyft/envoy-api#apis for a description of the role of
+ * ADS and how it is intended to be used by a management server. ADS requests
+ * have the same structure as their singleton xDS counterparts, but can
+ * multiplex many resource types on a single stream. The type_url in the
+ * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover
+ * the multiplexed singleton APIs at the Envoy instance and management server.
+ * 
+ * + * Protobuf service {@code envoy.service.discovery.v2.AggregatedDiscoveryService} + */ +public abstract class AggregatedDiscoveryService + implements com.google.protobuf.Service { + protected AggregatedDiscoveryService() {} + + public interface Interface { + /** + *
+     * This is a gRPC-only API.
+     * 
+ * + * rpc StreamAggregatedResources(stream .envoy.api.v2.DiscoveryRequest) returns (stream .envoy.api.v2.DiscoveryResponse); + */ + public abstract void streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc IncrementalAggregatedResources(stream .envoy.api.v2.IncrementalDiscoveryRequest) returns (stream .envoy.api.v2.IncrementalDiscoveryResponse); + */ + public abstract void incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new AggregatedDiscoveryService() { + @java.lang.Override + public void streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request, + com.google.protobuf.RpcCallback done) { + impl.streamAggregatedResources(controller, request, done); + } + + @java.lang.Override + public void incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request, + com.google.protobuf.RpcCallback done) { + impl.incrementalAggregatedResources(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.streamAggregatedResources(controller, (io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest)request); + case 1: + return impl.incrementalAggregatedResources(controller, (io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest.getDefaultInstance(); + case 1: + return io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance(); + case 1: + return io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + *
+   * This is a gRPC-only API.
+   * 
+ * + * rpc StreamAggregatedResources(stream .envoy.api.v2.DiscoveryRequest) returns (stream .envoy.api.v2.DiscoveryResponse); + */ + public abstract void streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc IncrementalAggregatedResources(stream .envoy.api.v2.IncrementalDiscoveryRequest) returns (stream .envoy.api.v2.IncrementalDiscoveryResponse); + */ + public abstract void incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.discovery.v2.Ads.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.streamAggregatedResources(controller, (io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 1: + this.incrementalAggregatedResources(controller, (io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest.getDefaultInstance(); + case 1: + return io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance(); + case 1: + return io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends io.grpc.xds.shaded.envoy.service.discovery.v2.AggregatedDiscoveryService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.class, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance())); + } + + public void incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(1), + controller, + request, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.class, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request) + throws com.google.protobuf.ServiceException; + + public io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse streamAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryRequest request) + throws com.google.protobuf.ServiceException { + return (io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + io.grpc.xds.shaded.envoy.api.v2.DiscoveryResponse.getDefaultInstance()); + } + + + public io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse incrementalAggregatedResources( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryRequest request) + throws com.google.protobuf.ServiceException { + return (io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(1), + controller, + request, + io.grpc.xds.shaded.envoy.api.v2.IncrementalDiscoveryResponse.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:envoy.service.discovery.v2.AggregatedDiscoveryService) +} + diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingService.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingService.java new file mode 100644 index 0000000000..e55f02abd1 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadReportingService.java @@ -0,0 +1,297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +/** + * Protobuf service {@code envoy.service.load_stats.v2.LoadReportingService} + */ +public abstract class LoadReportingService + implements com.google.protobuf.Service { + protected LoadReportingService() {} + + public interface Interface { + /** + *
+     * Advanced API to allow for multi-dimensional load balancing by remote
+     * server. For receiving LB assignments, the steps are:
+     * 1, The management server is configured with per cluster/zone/load metric
+     *    capacity configuration. The capacity configuration definition is
+     *    outside of the scope of this document.
+     * 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+     *    to balance.
+     * Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+     * management server:
+     * 1. Once a connection establishes, the management server publishes a
+     *    LoadStatsResponse for all clusters it is interested in learning load
+     *    stats about.
+     * 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+     *    based on per-zone weights and/or per-instance weights (if specified)
+     *    based on intra-zone LbPolicy. This information comes from the above
+     *    {Stream,Fetch}Endpoints.
+     * 3. When upstream hosts reply, they optionally add header <define header
+     *    name> with ASCII representation of EndpointLoadMetricStats.
+     * 4. Envoy aggregates load reports over the period of time given to it in
+     *    LoadStatsResponse.load_reporting_interval. This includes aggregation
+     *    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+     *    well as load metrics from upstream hosts.
+     * 5. When the timer of load_reporting_interval expires, Envoy sends new
+     *    LoadStatsRequest filled with load reports for each cluster.
+     * 6. The management server uses the load reports from all reported Envoys
+     *    from around the world, computes global assignment and prepares traffic
+     *    assignment destined for each zone Envoys are located in. Goto 2.
+     * 
+ * + * rpc StreamLoadStats(stream .envoy.service.load_stats.v2.LoadStatsRequest) returns (stream .envoy.service.load_stats.v2.LoadStatsResponse); + */ + public abstract void streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new LoadReportingService() { + @java.lang.Override + public void streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request, + com.google.protobuf.RpcCallback done) { + impl.streamLoadStats(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.streamLoadStats(controller, (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + *
+   * Advanced API to allow for multi-dimensional load balancing by remote
+   * server. For receiving LB assignments, the steps are:
+   * 1, The management server is configured with per cluster/zone/load metric
+   *    capacity configuration. The capacity configuration definition is
+   *    outside of the scope of this document.
+   * 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+   *    to balance.
+   * Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+   * management server:
+   * 1. Once a connection establishes, the management server publishes a
+   *    LoadStatsResponse for all clusters it is interested in learning load
+   *    stats about.
+   * 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+   *    based on per-zone weights and/or per-instance weights (if specified)
+   *    based on intra-zone LbPolicy. This information comes from the above
+   *    {Stream,Fetch}Endpoints.
+   * 3. When upstream hosts reply, they optionally add header <define header
+   *    name> with ASCII representation of EndpointLoadMetricStats.
+   * 4. Envoy aggregates load reports over the period of time given to it in
+   *    LoadStatsResponse.load_reporting_interval. This includes aggregation
+   *    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+   *    well as load metrics from upstream hosts.
+   * 5. When the timer of load_reporting_interval expires, Envoy sends new
+   *    LoadStatsRequest filled with load reports for each cluster.
+   * 6. The management server uses the load reports from all reported Envoys
+   *    from around the world, computes global assignment and prepares traffic
+   *    assignment destined for each zone Envoys are located in. Goto 2.
+   * 
+ * + * rpc StreamLoadStats(stream .envoy.service.load_stats.v2.LoadStatsRequest) returns (stream .envoy.service.load_stats.v2.LoadStatsResponse); + */ + public abstract void streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.streamLoadStats(controller, (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadReportingService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.class, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse streamLoadStats( + com.google.protobuf.RpcController controller, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest request) + throws com.google.protobuf.ServiceException { + return (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:envoy.service.load_stats.v2.LoadReportingService) +} + diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequest.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequest.java new file mode 100644 index 0000000000..ae724430b1 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequest.java @@ -0,0 +1,1068 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +/** + *
+ * A load report Envoy sends to the management server.
+ * [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
+ * 
+ * + * Protobuf type {@code envoy.service.load_stats.v2.LoadStatsRequest} + */ +public final class LoadStatsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:envoy.service.load_stats.v2.LoadStatsRequest) + LoadStatsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LoadStatsRequest.newBuilder() to construct. + private LoadStatsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LoadStatsRequest() { + clusterStats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LoadStatsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder subBuilder = null; + if (node_ != null) { + subBuilder = node_.toBuilder(); + } + node_ = input.readMessage(io.grpc.xds.shaded.envoy.api.v2.core.Node.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(node_); + node_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + clusterStats_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + clusterStats_.add( + input.readMessage(io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + clusterStats_ = java.util.Collections.unmodifiableList(clusterStats_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.class, io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.Builder.class); + } + + private int bitField0_; + public static final int NODE_FIELD_NUMBER = 1; + private io.grpc.xds.shaded.envoy.api.v2.core.Node node_; + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public boolean hasNode() { + return node_ != null; + } + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public io.grpc.xds.shaded.envoy.api.v2.core.Node getNode() { + return node_ == null ? io.grpc.xds.shaded.envoy.api.v2.core.Node.getDefaultInstance() : node_; + } + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder getNodeOrBuilder() { + return getNode(); + } + + public static final int CLUSTER_STATS_FIELD_NUMBER = 2; + private java.util.List clusterStats_; + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public java.util.List getClusterStatsList() { + return clusterStats_; + } + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public java.util.List + getClusterStatsOrBuilderList() { + return clusterStats_; + } + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public int getClusterStatsCount() { + return clusterStats_.size(); + } + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats getClusterStats(int index) { + return clusterStats_.get(index); + } + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder getClusterStatsOrBuilder( + int index) { + return clusterStats_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (node_ != null) { + output.writeMessage(1, getNode()); + } + for (int i = 0; i < clusterStats_.size(); i++) { + output.writeMessage(2, clusterStats_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (node_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNode()); + } + for (int i = 0; i < clusterStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, clusterStats_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest)) { + return super.equals(obj); + } + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest other = (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest) obj; + + boolean result = true; + result = result && (hasNode() == other.hasNode()); + if (hasNode()) { + result = result && getNode() + .equals(other.getNode()); + } + result = result && getClusterStatsList() + .equals(other.getClusterStatsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNode()) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + } + if (getClusterStatsCount() > 0) { + hash = (37 * hash) + CLUSTER_STATS_FIELD_NUMBER; + hash = (53 * hash) + getClusterStatsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A load report Envoy sends to the management server.
+   * [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
+   * 
+ * + * Protobuf type {@code envoy.service.load_stats.v2.LoadStatsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:envoy.service.load_stats.v2.LoadStatsRequest) + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.class, io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.Builder.class); + } + + // Construct using io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getClusterStatsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (nodeBuilder_ == null) { + node_ = null; + } else { + node_ = null; + nodeBuilder_ = null; + } + if (clusterStatsBuilder_ == null) { + clusterStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + clusterStatsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest getDefaultInstanceForType() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.getDefaultInstance(); + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest build() { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest buildPartial() { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest result = new io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (nodeBuilder_ == null) { + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + if (clusterStatsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + clusterStats_ = java.util.Collections.unmodifiableList(clusterStats_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.clusterStats_ = clusterStats_; + } else { + result.clusterStats_ = clusterStatsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest) { + return mergeFrom((io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest other) { + if (other == io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest.getDefaultInstance()) return this; + if (other.hasNode()) { + mergeNode(other.getNode()); + } + if (clusterStatsBuilder_ == null) { + if (!other.clusterStats_.isEmpty()) { + if (clusterStats_.isEmpty()) { + clusterStats_ = other.clusterStats_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureClusterStatsIsMutable(); + clusterStats_.addAll(other.clusterStats_); + } + onChanged(); + } + } else { + if (!other.clusterStats_.isEmpty()) { + if (clusterStatsBuilder_.isEmpty()) { + clusterStatsBuilder_.dispose(); + clusterStatsBuilder_ = null; + clusterStats_ = other.clusterStats_; + bitField0_ = (bitField0_ & ~0x00000002); + clusterStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getClusterStatsFieldBuilder() : null; + } else { + clusterStatsBuilder_.addAllMessages(other.clusterStats_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private io.grpc.xds.shaded.envoy.api.v2.core.Node node_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.core.Node, io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder, io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder> nodeBuilder_; + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public boolean hasNode() { + return nodeBuilder_ != null || node_ != null; + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public io.grpc.xds.shaded.envoy.api.v2.core.Node getNode() { + if (nodeBuilder_ == null) { + return node_ == null ? io.grpc.xds.shaded.envoy.api.v2.core.Node.getDefaultInstance() : node_; + } else { + return nodeBuilder_.getMessage(); + } + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public Builder setNode(io.grpc.xds.shaded.envoy.api.v2.core.Node value) { + if (nodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + onChanged(); + } else { + nodeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public Builder setNode( + io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + node_ = builderForValue.build(); + onChanged(); + } else { + nodeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public Builder mergeNode(io.grpc.xds.shaded.envoy.api.v2.core.Node value) { + if (nodeBuilder_ == null) { + if (node_ != null) { + node_ = + io.grpc.xds.shaded.envoy.api.v2.core.Node.newBuilder(node_).mergeFrom(value).buildPartial(); + } else { + node_ = value; + } + onChanged(); + } else { + nodeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = null; + onChanged(); + } else { + node_ = null; + nodeBuilder_ = null; + } + + return this; + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder getNodeBuilder() { + + onChanged(); + return getNodeFieldBuilder().getBuilder(); + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + public io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder getNodeOrBuilder() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilder(); + } else { + return node_ == null ? + io.grpc.xds.shaded.envoy.api.v2.core.Node.getDefaultInstance() : node_; + } + } + /** + *
+     * Node identifier for Envoy instance.
+     * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.core.Node, io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder, io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.core.Node, io.grpc.xds.shaded.envoy.api.v2.core.Node.Builder, io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder>( + getNode(), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + + private java.util.List clusterStats_ = + java.util.Collections.emptyList(); + private void ensureClusterStatsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + clusterStats_ = new java.util.ArrayList(clusterStats_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder> clusterStatsBuilder_; + + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public java.util.List getClusterStatsList() { + if (clusterStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(clusterStats_); + } else { + return clusterStatsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public int getClusterStatsCount() { + if (clusterStatsBuilder_ == null) { + return clusterStats_.size(); + } else { + return clusterStatsBuilder_.getCount(); + } + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats getClusterStats(int index) { + if (clusterStatsBuilder_ == null) { + return clusterStats_.get(index); + } else { + return clusterStatsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder setClusterStats( + int index, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats value) { + if (clusterStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterStatsIsMutable(); + clusterStats_.set(index, value); + onChanged(); + } else { + clusterStatsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder setClusterStats( + int index, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder builderForValue) { + if (clusterStatsBuilder_ == null) { + ensureClusterStatsIsMutable(); + clusterStats_.set(index, builderForValue.build()); + onChanged(); + } else { + clusterStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder addClusterStats(io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats value) { + if (clusterStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterStatsIsMutable(); + clusterStats_.add(value); + onChanged(); + } else { + clusterStatsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder addClusterStats( + int index, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats value) { + if (clusterStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterStatsIsMutable(); + clusterStats_.add(index, value); + onChanged(); + } else { + clusterStatsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder addClusterStats( + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder builderForValue) { + if (clusterStatsBuilder_ == null) { + ensureClusterStatsIsMutable(); + clusterStats_.add(builderForValue.build()); + onChanged(); + } else { + clusterStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder addClusterStats( + int index, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder builderForValue) { + if (clusterStatsBuilder_ == null) { + ensureClusterStatsIsMutable(); + clusterStats_.add(index, builderForValue.build()); + onChanged(); + } else { + clusterStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder addAllClusterStats( + java.lang.Iterable values) { + if (clusterStatsBuilder_ == null) { + ensureClusterStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, clusterStats_); + onChanged(); + } else { + clusterStatsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder clearClusterStats() { + if (clusterStatsBuilder_ == null) { + clusterStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + clusterStatsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public Builder removeClusterStats(int index) { + if (clusterStatsBuilder_ == null) { + ensureClusterStatsIsMutable(); + clusterStats_.remove(index); + onChanged(); + } else { + clusterStatsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder getClusterStatsBuilder( + int index) { + return getClusterStatsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder getClusterStatsOrBuilder( + int index) { + if (clusterStatsBuilder_ == null) { + return clusterStats_.get(index); } else { + return clusterStatsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public java.util.List + getClusterStatsOrBuilderList() { + if (clusterStatsBuilder_ != null) { + return clusterStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clusterStats_); + } + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder addClusterStatsBuilder() { + return getClusterStatsFieldBuilder().addBuilder( + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.getDefaultInstance()); + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder addClusterStatsBuilder( + int index) { + return getClusterStatsFieldBuilder().addBuilder( + index, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.getDefaultInstance()); + } + /** + *
+     * A list of load stats to report.
+     * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + public java.util.List + getClusterStatsBuilderList() { + return getClusterStatsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder> + getClusterStatsFieldBuilder() { + if (clusterStatsBuilder_ == null) { + clusterStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats.Builder, io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder>( + clusterStats_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + clusterStats_ = null; + } + return clusterStatsBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:envoy.service.load_stats.v2.LoadStatsRequest) + } + + // @@protoc_insertion_point(class_scope:envoy.service.load_stats.v2.LoadStatsRequest) + private static final io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest(); + } + + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LoadStatsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadStatsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequestOrBuilder.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequestOrBuilder.java new file mode 100644 index 0000000000..3d4a29dcab --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +public interface LoadStatsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:envoy.service.load_stats.v2.LoadStatsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + boolean hasNode(); + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + io.grpc.xds.shaded.envoy.api.v2.core.Node getNode(); + /** + *
+   * Node identifier for Envoy instance.
+   * 
+ * + * .envoy.api.v2.core.Node node = 1; + */ + io.grpc.xds.shaded.envoy.api.v2.core.NodeOrBuilder getNodeOrBuilder(); + + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + java.util.List + getClusterStatsList(); + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStats getClusterStats(int index); + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + int getClusterStatsCount(); + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + java.util.List + getClusterStatsOrBuilderList(); + /** + *
+   * A list of load stats to report.
+   * 
+ * + * repeated .envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; + */ + io.grpc.xds.shaded.envoy.api.v2.endpoint.ClusterStatsOrBuilder getClusterStatsOrBuilder( + int index); +} diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponse.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponse.java new file mode 100644 index 0000000000..ff934e8f66 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponse.java @@ -0,0 +1,1008 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +/** + *
+ * The management server sends envoy a LoadStatsResponse with all clusters it
+ * is interested in learning load stats about.
+ * [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
+ * 
+ * + * Protobuf type {@code envoy.service.load_stats.v2.LoadStatsResponse} + */ +public final class LoadStatsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:envoy.service.load_stats.v2.LoadStatsResponse) + LoadStatsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use LoadStatsResponse.newBuilder() to construct. + private LoadStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LoadStatsResponse() { + clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + reportEndpointGranularity_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LoadStatsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + clusters_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + clusters_.add(s); + break; + } + case 18: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (loadReportingInterval_ != null) { + subBuilder = loadReportingInterval_.toBuilder(); + } + loadReportingInterval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(loadReportingInterval_); + loadReportingInterval_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + reportEndpointGranularity_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + clusters_ = clusters_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.class, io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.Builder.class); + } + + private int bitField0_; + public static final int CLUSTERS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList clusters_; + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public com.google.protobuf.ProtocolStringList + getClustersList() { + return clusters_; + } + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public int getClustersCount() { + return clusters_.size(); + } + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public java.lang.String getClusters(int index) { + return clusters_.get(index); + } + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public com.google.protobuf.ByteString + getClustersBytes(int index) { + return clusters_.getByteString(index); + } + + public static final int LOAD_REPORTING_INTERVAL_FIELD_NUMBER = 2; + private com.google.protobuf.Duration loadReportingInterval_; + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public boolean hasLoadReportingInterval() { + return loadReportingInterval_ != null; + } + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public com.google.protobuf.Duration getLoadReportingInterval() { + return loadReportingInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_; + } + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public com.google.protobuf.DurationOrBuilder getLoadReportingIntervalOrBuilder() { + return getLoadReportingInterval(); + } + + public static final int REPORT_ENDPOINT_GRANULARITY_FIELD_NUMBER = 3; + private boolean reportEndpointGranularity_; + /** + *
+   * Set to *true* if the management server supports endpoint granularity
+   * report.
+   * 
+ * + * bool report_endpoint_granularity = 3; + */ + public boolean getReportEndpointGranularity() { + return reportEndpointGranularity_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < clusters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusters_.getRaw(i)); + } + if (loadReportingInterval_ != null) { + output.writeMessage(2, getLoadReportingInterval()); + } + if (reportEndpointGranularity_ != false) { + output.writeBool(3, reportEndpointGranularity_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < clusters_.size(); i++) { + dataSize += computeStringSizeNoTag(clusters_.getRaw(i)); + } + size += dataSize; + size += 1 * getClustersList().size(); + } + if (loadReportingInterval_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLoadReportingInterval()); + } + if (reportEndpointGranularity_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, reportEndpointGranularity_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse)) { + return super.equals(obj); + } + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse other = (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse) obj; + + boolean result = true; + result = result && getClustersList() + .equals(other.getClustersList()); + result = result && (hasLoadReportingInterval() == other.hasLoadReportingInterval()); + if (hasLoadReportingInterval()) { + result = result && getLoadReportingInterval() + .equals(other.getLoadReportingInterval()); + } + result = result && (getReportEndpointGranularity() + == other.getReportEndpointGranularity()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getClustersCount() > 0) { + hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getClustersList().hashCode(); + } + if (hasLoadReportingInterval()) { + hash = (37 * hash) + LOAD_REPORTING_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getLoadReportingInterval().hashCode(); + } + hash = (37 * hash) + REPORT_ENDPOINT_GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReportEndpointGranularity()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The management server sends envoy a LoadStatsResponse with all clusters it
+   * is interested in learning load stats about.
+   * [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
+   * 
+ * + * Protobuf type {@code envoy.service.load_stats.v2.LoadStatsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:envoy.service.load_stats.v2.LoadStatsResponse) + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.class, io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.Builder.class); + } + + // Construct using io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (loadReportingIntervalBuilder_ == null) { + loadReportingInterval_ = null; + } else { + loadReportingInterval_ = null; + loadReportingIntervalBuilder_ = null; + } + reportEndpointGranularity_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.Lrs.internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse getDefaultInstanceForType() { + return io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance(); + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse build() { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse buildPartial() { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse result = new io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + clusters_ = clusters_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clusters_ = clusters_; + if (loadReportingIntervalBuilder_ == null) { + result.loadReportingInterval_ = loadReportingInterval_; + } else { + result.loadReportingInterval_ = loadReportingIntervalBuilder_.build(); + } + result.reportEndpointGranularity_ = reportEndpointGranularity_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse) { + return mergeFrom((io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse other) { + if (other == io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse.getDefaultInstance()) return this; + if (!other.clusters_.isEmpty()) { + if (clusters_.isEmpty()) { + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClustersIsMutable(); + clusters_.addAll(other.clusters_); + } + onChanged(); + } + if (other.hasLoadReportingInterval()) { + mergeLoadReportingInterval(other.getLoadReportingInterval()); + } + if (other.getReportEndpointGranularity() != false) { + setReportEndpointGranularity(other.getReportEndpointGranularity()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureClustersIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + clusters_ = new com.google.protobuf.LazyStringArrayList(clusters_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public com.google.protobuf.ProtocolStringList + getClustersList() { + return clusters_.getUnmodifiableView(); + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public int getClustersCount() { + return clusters_.size(); + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public java.lang.String getClusters(int index) { + return clusters_.get(index); + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public com.google.protobuf.ByteString + getClustersBytes(int index) { + return clusters_.getByteString(index); + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public Builder setClusters( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public Builder addClusters( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(value); + onChanged(); + return this; + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public Builder addAllClusters( + java.lang.Iterable values) { + ensureClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, clusters_); + onChanged(); + return this; + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public Builder clearClusters() { + clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Clusters to report stats for.
+     * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + public Builder addClustersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClustersIsMutable(); + clusters_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Duration loadReportingInterval_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> loadReportingIntervalBuilder_; + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public boolean hasLoadReportingInterval() { + return loadReportingIntervalBuilder_ != null || loadReportingInterval_ != null; + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public com.google.protobuf.Duration getLoadReportingInterval() { + if (loadReportingIntervalBuilder_ == null) { + return loadReportingInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_; + } else { + return loadReportingIntervalBuilder_.getMessage(); + } + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public Builder setLoadReportingInterval(com.google.protobuf.Duration value) { + if (loadReportingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadReportingInterval_ = value; + onChanged(); + } else { + loadReportingIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public Builder setLoadReportingInterval( + com.google.protobuf.Duration.Builder builderForValue) { + if (loadReportingIntervalBuilder_ == null) { + loadReportingInterval_ = builderForValue.build(); + onChanged(); + } else { + loadReportingIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public Builder mergeLoadReportingInterval(com.google.protobuf.Duration value) { + if (loadReportingIntervalBuilder_ == null) { + if (loadReportingInterval_ != null) { + loadReportingInterval_ = + com.google.protobuf.Duration.newBuilder(loadReportingInterval_).mergeFrom(value).buildPartial(); + } else { + loadReportingInterval_ = value; + } + onChanged(); + } else { + loadReportingIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public Builder clearLoadReportingInterval() { + if (loadReportingIntervalBuilder_ == null) { + loadReportingInterval_ = null; + onChanged(); + } else { + loadReportingInterval_ = null; + loadReportingIntervalBuilder_ = null; + } + + return this; + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public com.google.protobuf.Duration.Builder getLoadReportingIntervalBuilder() { + + onChanged(); + return getLoadReportingIntervalFieldBuilder().getBuilder(); + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + public com.google.protobuf.DurationOrBuilder getLoadReportingIntervalOrBuilder() { + if (loadReportingIntervalBuilder_ != null) { + return loadReportingIntervalBuilder_.getMessageOrBuilder(); + } else { + return loadReportingInterval_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_; + } + } + /** + *
+     * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+     * 1. There may be some delay from when the timer fires until stats sampling occurs.
+     * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+     *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+     *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+     *    of inobservability that might otherwise exists between the messages. New clusters are not
+     *    subject to this consideration.
+     * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getLoadReportingIntervalFieldBuilder() { + if (loadReportingIntervalBuilder_ == null) { + loadReportingIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getLoadReportingInterval(), + getParentForChildren(), + isClean()); + loadReportingInterval_ = null; + } + return loadReportingIntervalBuilder_; + } + + private boolean reportEndpointGranularity_ ; + /** + *
+     * Set to *true* if the management server supports endpoint granularity
+     * report.
+     * 
+ * + * bool report_endpoint_granularity = 3; + */ + public boolean getReportEndpointGranularity() { + return reportEndpointGranularity_; + } + /** + *
+     * Set to *true* if the management server supports endpoint granularity
+     * report.
+     * 
+ * + * bool report_endpoint_granularity = 3; + */ + public Builder setReportEndpointGranularity(boolean value) { + + reportEndpointGranularity_ = value; + onChanged(); + return this; + } + /** + *
+     * Set to *true* if the management server supports endpoint granularity
+     * report.
+     * 
+ * + * bool report_endpoint_granularity = 3; + */ + public Builder clearReportEndpointGranularity() { + + reportEndpointGranularity_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:envoy.service.load_stats.v2.LoadStatsResponse) + } + + // @@protoc_insertion_point(class_scope:envoy.service.load_stats.v2.LoadStatsResponse) + private static final io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse(); + } + + public static io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LoadStatsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LoadStatsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.xds.shaded.envoy.service.load_stats.v2.LoadStatsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponseOrBuilder.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponseOrBuilder.java new file mode 100644 index 0000000000..7a3fa80577 --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/LoadStatsResponseOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +public interface LoadStatsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:envoy.service.load_stats.v2.LoadStatsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + java.util.List + getClustersList(); + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + int getClustersCount(); + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + java.lang.String getClusters(int index); + /** + *
+   * Clusters to report stats for.
+   * 
+ * + * repeated string clusters = 1 [(.validate.rules) = { ... } + */ + com.google.protobuf.ByteString + getClustersBytes(int index); + + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + boolean hasLoadReportingInterval(); + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + com.google.protobuf.Duration getLoadReportingInterval(); + /** + *
+   * The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+   * 1. There may be some delay from when the timer fires until stats sampling occurs.
+   * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
+   *    that is observed in between the corresponding previous *LoadStatsRequest* and this
+   *    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
+   *    of inobservability that might otherwise exists between the messages. New clusters are not
+   *    subject to this consideration.
+   * 
+ * + * .google.protobuf.Duration load_reporting_interval = 2; + */ + com.google.protobuf.DurationOrBuilder getLoadReportingIntervalOrBuilder(); + + /** + *
+   * Set to *true* if the management server supports endpoint granularity
+   * report.
+   * 
+ * + * bool report_endpoint_granularity = 3; + */ + boolean getReportEndpointGranularity(); +} diff --git a/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/Lrs.java b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/Lrs.java new file mode 100644 index 0000000000..ce8d4c267c --- /dev/null +++ b/xds/src/generated/main/java/io/grpc/xds/shaded/envoy/service/load_stats/v2/Lrs.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: envoy/service/load_stats/v2/lrs.proto + +package io.grpc.xds.shaded.envoy.service.load_stats.v2; + +public final class Lrs { + private Lrs() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_envoy_service_load_stats_v2_LoadStatsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_envoy_service_load_stats_v2_LoadStatsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%envoy/service/load_stats/v2/lrs.proto\022" + + "\033envoy.service.load_stats.v2\032\034envoy/api/" + + "v2/core/base.proto\032\'envoy/api/v2/endpoin" + + "t/load_report.proto\032\036google/protobuf/dur" + + "ation.proto\032\027validate/validate.proto\"u\n\020" + + "LoadStatsRequest\022%\n\004node\030\001 \001(\0132\027.envoy.a" + + "pi.v2.core.Node\022:\n\rcluster_stats\030\002 \003(\0132#" + + ".envoy.api.v2.endpoint.ClusterStats\"\222\001\n\021" + + "LoadStatsResponse\022\034\n\010clusters\030\001 \003(\tB\n\272\351\300" + + "\003\005\222\001\002\010\001\022:\n\027load_reporting_interval\030\002 \001(\013" + + "2\031.google.protobuf.Duration\022#\n\033report_en" + + "dpoint_granularity\030\003 \001(\0102\216\001\n\024LoadReporti" + + "ngService\022v\n\017StreamLoadStats\022-.envoy.ser" + + "vice.load_stats.v2.LoadStatsRequest\032..en" + + "voy.service.load_stats.v2.LoadStatsRespo" + + "nse\"\000(\0010\001B9\n.io.grpc.xds.shaded.envoy.se" + + "rvice.load_stats.v2P\001Z\002v2\210\001\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grpc.xds.shaded.envoy.api.v2.core.Base.getDescriptor(), + io.grpc.xds.shaded.envoy.api.v2.endpoint.LoadReport.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + io.grpc.xds.shaded.validate.Validate.getDescriptor(), + }, assigner); + internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_envoy_service_load_stats_v2_LoadStatsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_envoy_service_load_stats_v2_LoadStatsRequest_descriptor, + new java.lang.String[] { "Node", "ClusterStats", }); + internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_envoy_service_load_stats_v2_LoadStatsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_envoy_service_load_stats_v2_LoadStatsResponse_descriptor, + new java.lang.String[] { "Clusters", "LoadReportingInterval", "ReportEndpointGranularity", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(io.grpc.xds.shaded.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + io.grpc.xds.shaded.envoy.api.v2.core.Base.getDescriptor(); + io.grpc.xds.shaded.envoy.api.v2.endpoint.LoadReport.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + io.grpc.xds.shaded.validate.Validate.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/xds/third_party/envoy/import.sh b/xds/third_party/envoy/import.sh index 49ce7bb6a2..a531edf6e2 100755 --- a/xds/third_party/envoy/import.sh +++ b/xds/third_party/envoy/import.sh @@ -16,7 +16,7 @@ # in this directory run the following commands BRANCH=master # import VERSION from one of the google internal CLs -VERSION=6ea4a035315109fa6c5eff5b74e983729a179f3f +VERSION=553c21b796f9dd7b3d1ae01cdfc4bebdd3b28338 GIT_REPO="https://github.com/envoyproxy/envoy.git" GIT_BASE_DIR=envoy SOURCE_PROTO_BASE_DIR=envoy/api @@ -36,6 +36,8 @@ envoy/api/v2/discovery.proto envoy/api/v2/eds.proto envoy/api/v2/endpoint/endpoint.proto envoy/api/v2/endpoint/load_report.proto +envoy/service/discovery/v2/ads.proto +envoy/service/load_stats/v2/lrs.proto envoy/type/percent.proto ) diff --git a/xds/third_party/envoy/src/main/proto/envoy/api/v2/auth/cert.proto b/xds/third_party/envoy/src/main/proto/envoy/api/v2/auth/cert.proto index 0e88a1122f..2efc2f4b1a 100644 --- a/xds/third_party/envoy/src/main/proto/envoy/api/v2/auth/cert.proto +++ b/xds/third_party/envoy/src/main/proto/envoy/api/v2/auth/cert.proto @@ -229,8 +229,8 @@ message CommonTlsContext { // TLS protocol versions, cipher suites etc. TlsParameters tls_params = 1; - // Multiple TLS certificates can be associated with the same context. - // E.g. to allow both RSA and ECDSA certificates, two TLS certificates can be configured. + // :ref:`Multiple TLS certificates ` can be associated with the + // same context to allow both RSA and ECDSA certificates. // // Only a single TLS certificate is supported in client contexts. In server contexts, the first // RSA certificate is used for clients that only support RSA and the first ECDSA certificate is @@ -238,7 +238,8 @@ message CommonTlsContext { repeated TlsCertificate tls_certificates = 2; // Configs for fetching TLS certificates via SDS API. - repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6; + repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6 + [(validate.rules).repeated .max_items = 1]; message CombinedCertificateValidationContext { // How to validate peer certificates. diff --git a/xds/third_party/envoy/src/main/proto/envoy/api/v2/core/health_check.proto b/xds/third_party/envoy/src/main/proto/envoy/api/v2/core/health_check.proto index 545e3001b0..daf974a1a0 100644 --- a/xds/third_party/envoy/src/main/proto/envoy/api/v2/core/health_check.proto +++ b/xds/third_party/envoy/src/main/proto/envoy/api/v2/core/health_check.proto @@ -146,6 +146,11 @@ message HealthCheck { // message. See `gRPC health-checking overview // `_ for more information. string service_name = 1; + + // The value of the :authority header in the gRPC health check request. If + // left empty (default value), the name of the cluster this health check is associated + // with will be used. + string authority = 2; } // Custom health check. diff --git a/xds/third_party/envoy/src/main/proto/envoy/api/v2/eds.proto b/xds/third_party/envoy/src/main/proto/envoy/api/v2/eds.proto index d9e6627d13..403da4089f 100644 --- a/xds/third_party/envoy/src/main/proto/envoy/api/v2/eds.proto +++ b/xds/third_party/envoy/src/main/proto/envoy/api/v2/eds.proto @@ -91,7 +91,12 @@ message ClusterLoadAssignment { // multiplied by the overprovisioning factor drops below 100. // With the default value 140(1.4), Envoy doesn't consider a priority level // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. + // below 72%. For example: + // + // .. code-block:: json + // + // { "overprovisioning_factor": 100 } + // // Read more at :ref:`priority levels ` and // :ref:`localities `. google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32.gt = 0]; diff --git a/xds/third_party/envoy/src/main/proto/envoy/service/discovery/v2/ads.proto b/xds/third_party/envoy/src/main/proto/envoy/service/discovery/v2/ads.proto new file mode 100644 index 0000000000..64f2f51e7b --- /dev/null +++ b/xds/third_party/envoy/src/main/proto/envoy/service/discovery/v2/ads.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.service.discovery.v2; +option java_package = "io.grpc.xds.shaded.envoy.service.discovery.v2"; +option java_multiple_files = true; +option go_package = "v2"; +option java_generic_services = true; + +import "envoy/api/v2/discovery.proto"; + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 +message AdsDummy { +} + +// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes, +// and listeners are retained in the package `envoy.api.v2` for backwards +// compatibility with existing management servers. New development in discovery +// services should proceed in the package `envoy.service.discovery.v2`. + +// See https://github.com/lyft/envoy-api#apis for a description of the role of +// ADS and how it is intended to be used by a management server. ADS requests +// have the same structure as their singleton xDS counterparts, but can +// multiplex many resource types on a single stream. The type_url in the +// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover +// the multiplexed singleton APIs at the Envoy instance and management server. +service AggregatedDiscoveryService { + // This is a gRPC-only API. + rpc StreamAggregatedResources(stream envoy.api.v2.DiscoveryRequest) + returns (stream envoy.api.v2.DiscoveryResponse) { + } + + rpc IncrementalAggregatedResources(stream envoy.api.v2.IncrementalDiscoveryRequest) + returns (stream envoy.api.v2.IncrementalDiscoveryResponse) { + } +} diff --git a/xds/third_party/envoy/src/main/proto/envoy/service/load_stats/v2/lrs.proto b/xds/third_party/envoy/src/main/proto/envoy/service/load_stats/v2/lrs.proto new file mode 100644 index 0000000000..2c41203667 --- /dev/null +++ b/xds/third_party/envoy/src/main/proto/envoy/service/load_stats/v2/lrs.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; + +package envoy.service.load_stats.v2; +option java_package = "io.grpc.xds.shaded.envoy.service.load_stats.v2"; +option java_multiple_files = true; +option go_package = "v2"; +option java_generic_services = true; + +import "envoy/api/v2/core/base.proto"; +import "envoy/api/v2/endpoint/load_report.proto"; + +import "google/protobuf/duration.proto"; + +import "validate/validate.proto"; + +// [#protodoc-title: Load reporting service] + +service LoadReportingService { + // Advanced API to allow for multi-dimensional load balancing by remote + // server. For receiving LB assignments, the steps are: + // 1, The management server is configured with per cluster/zone/load metric + // capacity configuration. The capacity configuration definition is + // outside of the scope of this document. + // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters + // to balance. + // + // Independently, Envoy will initiate a StreamLoadStats bidi stream with a + // management server: + // 1. Once a connection establishes, the management server publishes a + // LoadStatsResponse for all clusters it is interested in learning load + // stats about. + // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts + // based on per-zone weights and/or per-instance weights (if specified) + // based on intra-zone LbPolicy. This information comes from the above + // {Stream,Fetch}Endpoints. + // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. + // 4. Envoy aggregates load reports over the period of time given to it in + // LoadStatsResponse.load_reporting_interval. This includes aggregation + // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as + // well as load metrics from upstream hosts. + // 5. When the timer of load_reporting_interval expires, Envoy sends new + // LoadStatsRequest filled with load reports for each cluster. + // 6. The management server uses the load reports from all reported Envoys + // from around the world, computes global assignment and prepares traffic + // assignment destined for each zone Envoys are located in. Goto 2. + rpc StreamLoadStats(stream LoadStatsRequest) returns (stream LoadStatsResponse) { + } +} + +// A load report Envoy sends to the management server. +// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. +message LoadStatsRequest { + // Node identifier for Envoy instance. + envoy.api.v2.core.Node node = 1; + + // A list of load stats to report. + repeated envoy.api.v2.endpoint.ClusterStats cluster_stats = 2; +} + +// The management server sends envoy a LoadStatsResponse with all clusters it +// is interested in learning load stats about. +// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. +message LoadStatsResponse { + // Clusters to report stats for. + repeated string clusters = 1 [(validate.rules).repeated .min_items = 1]; + + // The minimum interval of time to collect stats over. This is only a minimum for two reasons: + // 1. There may be some delay from when the timer fires until stats sampling occurs. + // 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic + // that is observed in between the corresponding previous *LoadStatsRequest* and this + // *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period + // of inobservability that might otherwise exists between the messages. New clusters are not + // subject to this consideration. + google.protobuf.Duration load_reporting_interval = 2; + + // Set to *true* if the management server supports endpoint granularity + // report. + bool report_endpoint_granularity = 3; +}