Class RequestMetadata.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
com.google.cloud.audit.RequestMetadata.Builder
All Implemented Interfaces:
RequestMetadataOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RequestMetadata

public static final class RequestMetadata.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder> implements RequestMetadataOrBuilder
 Metadata about the request.
 
Protobuf type google.cloud.audit.RequestMetadata
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • clear

      public RequestMetadata.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.GeneratedMessageV3.Builder<RequestMetadata.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.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • getDefaultInstanceForType

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

      public RequestMetadata build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RequestMetadata buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public RequestMetadata.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • setField

      public RequestMetadata.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • clearField

      public RequestMetadata.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • clearOneof

      public RequestMetadata.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • setRepeatedField

      public RequestMetadata.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • addRepeatedField

      public RequestMetadata.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • mergeFrom

      public RequestMetadata.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<RequestMetadata.Builder>
    • mergeFrom

      public RequestMetadata.Builder mergeFrom(RequestMetadata other)
    • isInitialized

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

      public RequestMetadata.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<RequestMetadata.Builder>
      Throws:
      IOException
    • getCallerIp

      public String getCallerIp()
       The IP address of the caller.
       For caller from internet, this will be public IPv4 or IPv6 address.
       For caller from a Compute Engine VM with external IP address, this
       will be the VM's external IP address. For caller from a Compute
       Engine VM without external IP address, if the VM is in the same
       organization (or project) as the accessed resource, `caller_ip` will
       be the VM's internal IPv4 address, otherwise the `caller_ip` will be
       redacted to "gce-internal-ip".
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       
      string caller_ip = 1;
      Specified by:
      getCallerIp in interface RequestMetadataOrBuilder
      Returns:
      The callerIp.
    • getCallerIpBytes

      public com.google.protobuf.ByteString getCallerIpBytes()
       The IP address of the caller.
       For caller from internet, this will be public IPv4 or IPv6 address.
       For caller from a Compute Engine VM with external IP address, this
       will be the VM's external IP address. For caller from a Compute
       Engine VM without external IP address, if the VM is in the same
       organization (or project) as the accessed resource, `caller_ip` will
       be the VM's internal IPv4 address, otherwise the `caller_ip` will be
       redacted to "gce-internal-ip".
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       
      string caller_ip = 1;
      Specified by:
      getCallerIpBytes in interface RequestMetadataOrBuilder
      Returns:
      The bytes for callerIp.
    • setCallerIp

      public RequestMetadata.Builder setCallerIp(String value)
       The IP address of the caller.
       For caller from internet, this will be public IPv4 or IPv6 address.
       For caller from a Compute Engine VM with external IP address, this
       will be the VM's external IP address. For caller from a Compute
       Engine VM without external IP address, if the VM is in the same
       organization (or project) as the accessed resource, `caller_ip` will
       be the VM's internal IPv4 address, otherwise the `caller_ip` will be
       redacted to "gce-internal-ip".
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       
      string caller_ip = 1;
      Parameters:
      value - The callerIp to set.
      Returns:
      This builder for chaining.
    • clearCallerIp

      public RequestMetadata.Builder clearCallerIp()
       The IP address of the caller.
       For caller from internet, this will be public IPv4 or IPv6 address.
       For caller from a Compute Engine VM with external IP address, this
       will be the VM's external IP address. For caller from a Compute
       Engine VM without external IP address, if the VM is in the same
       organization (or project) as the accessed resource, `caller_ip` will
       be the VM's internal IPv4 address, otherwise the `caller_ip` will be
       redacted to "gce-internal-ip".
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       
      string caller_ip = 1;
      Returns:
      This builder for chaining.
    • setCallerIpBytes

      public RequestMetadata.Builder setCallerIpBytes(com.google.protobuf.ByteString value)
       The IP address of the caller.
       For caller from internet, this will be public IPv4 or IPv6 address.
       For caller from a Compute Engine VM with external IP address, this
       will be the VM's external IP address. For caller from a Compute
       Engine VM without external IP address, if the VM is in the same
       organization (or project) as the accessed resource, `caller_ip` will
       be the VM's internal IPv4 address, otherwise the `caller_ip` will be
       redacted to "gce-internal-ip".
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       
      string caller_ip = 1;
      Parameters:
      value - The bytes for callerIp to set.
      Returns:
      This builder for chaining.
    • getCallerSuppliedUserAgent

      public String getCallerSuppliedUserAgent()
       The user agent of the caller.
       This information is not authenticated and should be treated accordingly.
       For example:
       +   `google-api-python-client/1.4.0`:
           The request was made by the Google API client for Python.
       +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
           The request was made by the Google Cloud SDK CLI (gcloud).
       +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
       s~my-project`:
           The request was made from the `my-project` App Engine app.
       
      string caller_supplied_user_agent = 2;
      Specified by:
      getCallerSuppliedUserAgent in interface RequestMetadataOrBuilder
      Returns:
      The callerSuppliedUserAgent.
    • getCallerSuppliedUserAgentBytes

      public com.google.protobuf.ByteString getCallerSuppliedUserAgentBytes()
       The user agent of the caller.
       This information is not authenticated and should be treated accordingly.
       For example:
       +   `google-api-python-client/1.4.0`:
           The request was made by the Google API client for Python.
       +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
           The request was made by the Google Cloud SDK CLI (gcloud).
       +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
       s~my-project`:
           The request was made from the `my-project` App Engine app.
       
      string caller_supplied_user_agent = 2;
      Specified by:
      getCallerSuppliedUserAgentBytes in interface RequestMetadataOrBuilder
      Returns:
      The bytes for callerSuppliedUserAgent.
    • setCallerSuppliedUserAgent

      public RequestMetadata.Builder setCallerSuppliedUserAgent(String value)
       The user agent of the caller.
       This information is not authenticated and should be treated accordingly.
       For example:
       +   `google-api-python-client/1.4.0`:
           The request was made by the Google API client for Python.
       +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
           The request was made by the Google Cloud SDK CLI (gcloud).
       +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
       s~my-project`:
           The request was made from the `my-project` App Engine app.
       
      string caller_supplied_user_agent = 2;
      Parameters:
      value - The callerSuppliedUserAgent to set.
      Returns:
      This builder for chaining.
    • clearCallerSuppliedUserAgent

      public RequestMetadata.Builder clearCallerSuppliedUserAgent()
       The user agent of the caller.
       This information is not authenticated and should be treated accordingly.
       For example:
       +   `google-api-python-client/1.4.0`:
           The request was made by the Google API client for Python.
       +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
           The request was made by the Google Cloud SDK CLI (gcloud).
       +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
       s~my-project`:
           The request was made from the `my-project` App Engine app.
       
      string caller_supplied_user_agent = 2;
      Returns:
      This builder for chaining.
    • setCallerSuppliedUserAgentBytes

      public RequestMetadata.Builder setCallerSuppliedUserAgentBytes(com.google.protobuf.ByteString value)
       The user agent of the caller.
       This information is not authenticated and should be treated accordingly.
       For example:
       +   `google-api-python-client/1.4.0`:
           The request was made by the Google API client for Python.
       +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
           The request was made by the Google Cloud SDK CLI (gcloud).
       +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
       s~my-project`:
           The request was made from the `my-project` App Engine app.
       
      string caller_supplied_user_agent = 2;
      Parameters:
      value - The bytes for callerSuppliedUserAgent to set.
      Returns:
      This builder for chaining.
    • getCallerNetwork

      public String getCallerNetwork()
       The network of the caller.
       Set only if the network host project is part of the same GCP organization
       (or project) as the accessed resource.
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       This is a scheme-less URI full resource name. For example:
           "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
       
      string caller_network = 3;
      Specified by:
      getCallerNetwork in interface RequestMetadataOrBuilder
      Returns:
      The callerNetwork.
    • getCallerNetworkBytes

      public com.google.protobuf.ByteString getCallerNetworkBytes()
       The network of the caller.
       Set only if the network host project is part of the same GCP organization
       (or project) as the accessed resource.
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       This is a scheme-less URI full resource name. For example:
           "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
       
      string caller_network = 3;
      Specified by:
      getCallerNetworkBytes in interface RequestMetadataOrBuilder
      Returns:
      The bytes for callerNetwork.
    • setCallerNetwork

      public RequestMetadata.Builder setCallerNetwork(String value)
       The network of the caller.
       Set only if the network host project is part of the same GCP organization
       (or project) as the accessed resource.
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       This is a scheme-less URI full resource name. For example:
           "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
       
      string caller_network = 3;
      Parameters:
      value - The callerNetwork to set.
      Returns:
      This builder for chaining.
    • clearCallerNetwork

      public RequestMetadata.Builder clearCallerNetwork()
       The network of the caller.
       Set only if the network host project is part of the same GCP organization
       (or project) as the accessed resource.
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       This is a scheme-less URI full resource name. For example:
           "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
       
      string caller_network = 3;
      Returns:
      This builder for chaining.
    • setCallerNetworkBytes

      public RequestMetadata.Builder setCallerNetworkBytes(com.google.protobuf.ByteString value)
       The network of the caller.
       Set only if the network host project is part of the same GCP organization
       (or project) as the accessed resource.
       See https://cloud.google.com/compute/docs/vpc/ for more information.
       This is a scheme-less URI full resource name. For example:
           "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
       
      string caller_network = 3;
      Parameters:
      value - The bytes for callerNetwork to set.
      Returns:
      This builder for chaining.
    • hasRequestAttributes

      public boolean hasRequestAttributes()
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
      Specified by:
      hasRequestAttributes in interface RequestMetadataOrBuilder
      Returns:
      Whether the requestAttributes field is set.
    • getRequestAttributes

      public AttributeContext.Request getRequestAttributes()
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
      Specified by:
      getRequestAttributes in interface RequestMetadataOrBuilder
      Returns:
      The requestAttributes.
    • setRequestAttributes

      public RequestMetadata.Builder setRequestAttributes(AttributeContext.Request value)
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
    • setRequestAttributes

      public RequestMetadata.Builder setRequestAttributes(AttributeContext.Request.Builder builderForValue)
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
    • mergeRequestAttributes

      public RequestMetadata.Builder mergeRequestAttributes(AttributeContext.Request value)
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
    • clearRequestAttributes

      public RequestMetadata.Builder clearRequestAttributes()
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
    • getRequestAttributesBuilder

      public AttributeContext.Request.Builder getRequestAttributesBuilder()
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
    • getRequestAttributesOrBuilder

      public AttributeContext.RequestOrBuilder getRequestAttributesOrBuilder()
       Request attributes used in IAM condition evaluation. This field contains
       request attributes like request time and access levels associated with
       the request.
       To get the whole view of the attributes used in IAM
       condition evaluation, the user must also look into
       `AuditLog.authentication_info.resource_attributes`.
       
      .google.rpc.context.AttributeContext.Request request_attributes = 7;
      Specified by:
      getRequestAttributesOrBuilder in interface RequestMetadataOrBuilder
    • hasDestinationAttributes

      public boolean hasDestinationAttributes()
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
      Specified by:
      hasDestinationAttributes in interface RequestMetadataOrBuilder
      Returns:
      Whether the destinationAttributes field is set.
    • getDestinationAttributes

      public AttributeContext.Peer getDestinationAttributes()
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
      Specified by:
      getDestinationAttributes in interface RequestMetadataOrBuilder
      Returns:
      The destinationAttributes.
    • setDestinationAttributes

      public RequestMetadata.Builder setDestinationAttributes(AttributeContext.Peer value)
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
    • setDestinationAttributes

      public RequestMetadata.Builder setDestinationAttributes(AttributeContext.Peer.Builder builderForValue)
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
    • mergeDestinationAttributes

      public RequestMetadata.Builder mergeDestinationAttributes(AttributeContext.Peer value)
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
    • clearDestinationAttributes

      public RequestMetadata.Builder clearDestinationAttributes()
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
    • getDestinationAttributesBuilder

      public AttributeContext.Peer.Builder getDestinationAttributesBuilder()
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
    • getDestinationAttributesOrBuilder

      public AttributeContext.PeerOrBuilder getDestinationAttributesOrBuilder()
       The destination of a network activity, such as accepting a TCP connection.
       In a multi hop network activity, the destination represents the receiver of
       the last hop. Only two fields are used in this message, Peer.port and
       Peer.ip. These fields are optionally populated by those services utilizing
       the IAM condition feature.
       
      .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
      Specified by:
      getDestinationAttributesOrBuilder in interface RequestMetadataOrBuilder
    • setUnknownFields

      public final RequestMetadata.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>
    • mergeUnknownFields

      public final RequestMetadata.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RequestMetadata.Builder>