Class HttpRoute.RequestMirrorPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
com.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy.Builder
All Implemented Interfaces:
HttpRoute.RequestMirrorPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
HttpRoute.RequestMirrorPolicy

public static final class HttpRoute.RequestMirrorPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder> implements HttpRoute.RequestMirrorPolicyOrBuilder
 Specifies the policy on how requests are shadowed to a separate mirrored
 destination service. The proxy does not wait for responses from the
 shadow service. Prior to sending traffic to the shadow service, the
 host/authority header is suffixed with -shadow.
 Mirroring is currently not supported for Cloud Run destinations.
 
Protobuf type google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
    • getDefaultInstanceForType

      public HttpRoute.RequestMirrorPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public HttpRoute.RequestMirrorPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public HttpRoute.RequestMirrorPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
    • mergeFrom

      public HttpRoute.RequestMirrorPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRoute.RequestMirrorPolicy.Builder>
      Throws:
      IOException
    • hasDestination

      public boolean hasDestination()
       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
      Specified by:
      hasDestination in interface HttpRoute.RequestMirrorPolicyOrBuilder
      Returns:
      Whether the destination field is set.
    • getDestination

      public HttpRoute.Destination getDestination()
       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
      Specified by:
      getDestination in interface HttpRoute.RequestMirrorPolicyOrBuilder
      Returns:
      The destination.
    • setDestination

       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
    • setDestination

       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
    • mergeDestination

       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
    • clearDestination

      public HttpRoute.RequestMirrorPolicy.Builder clearDestination()
       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
    • getDestinationBuilder

      public HttpRoute.Destination.Builder getDestinationBuilder()
       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
    • getDestinationOrBuilder

      public HttpRoute.DestinationOrBuilder getDestinationOrBuilder()
       The destination the requests will be mirrored to. The weight of the
       destination will be ignored.
       
      .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1;
      Specified by:
      getDestinationOrBuilder in interface HttpRoute.RequestMirrorPolicyOrBuilder
    • getMirrorPercent

      public float getMirrorPercent()
       Optional. The percentage of requests to get mirrored to the desired
       destination.
       
      float mirror_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMirrorPercent in interface HttpRoute.RequestMirrorPolicyOrBuilder
      Returns:
      The mirrorPercent.
    • setMirrorPercent

      public HttpRoute.RequestMirrorPolicy.Builder setMirrorPercent(float value)
       Optional. The percentage of requests to get mirrored to the desired
       destination.
       
      float mirror_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The mirrorPercent to set.
      Returns:
      This builder for chaining.
    • clearMirrorPercent

      public HttpRoute.RequestMirrorPolicy.Builder clearMirrorPercent()
       Optional. The percentage of requests to get mirrored to the desired
       destination.
       
      float mirror_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.