# Interface AttributeContextOrBuilder (2.72.0)

2.72.0 (latest) 2.70.0 2.67.0 2.66.0 2.65.1 2.64.1 2.63.2 2.62.0 2.61.3 2.60.0 2.59.2 2.58.0 2.57.0 2.56.0 2.54.1 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.0 2.46.0 2.45.1 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.1 2.38.0 2.37.1 2.36.0 2.34.0 2.33.0 2.32.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.1 2.22.1 2.21.1 2.15.0 2.14.3 2.13.0 2.12.0 2.11.0 2.10.0 2.9.6 2.8.4 2.7.4

    public interface AttributeContextOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getApi()

    public abstract AttributeContext.Api getApi()

Represents an API operation that is involved to a network activity.

`.google.rpc.context.AttributeContext.Api api = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Api` | The api. |

### getApiOrBuilder()

    public abstract AttributeContext.ApiOrBuilder getApiOrBuilder()

Represents an API operation that is involved to a network activity.

`.google.rpc.context.AttributeContext.Api api = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.ApiOrBuilder` |   |

### getDestination()

    public abstract AttributeContext.Peer getDestination()

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.

`.google.rpc.context.AttributeContext.Peer destination = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Peer` | The destination. |

### getDestinationOrBuilder()

    public abstract AttributeContext.PeerOrBuilder getDestinationOrBuilder()

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.

`.google.rpc.context.AttributeContext.Peer destination = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.PeerOrBuilder` |   |

### getExtensions(int index)

    public abstract Any getExtensions(int index)

Supports extensions for advanced use cases, such as logs and metrics.

`repeated .google.protobuf.Any extensions = 8;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Any.html` |   |

### getExtensionsCount()

    public abstract int getExtensionsCount()

Supports extensions for advanced use cases, such as logs and metrics.

`repeated .google.protobuf.Any extensions = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getExtensionsList()

    public abstract List<Any> getExtensionsList()

Supports extensions for advanced use cases, such as logs and metrics.

`repeated .google.protobuf.Any extensions = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Any.html>` |   |

### getExtensionsOrBuilder(int index)

    public abstract AnyOrBuilder getExtensionsOrBuilder(int index)

Supports extensions for advanced use cases, such as logs and metrics.

`repeated .google.protobuf.Any extensions = 8;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AnyOrBuilder.html` |   |

### getExtensionsOrBuilderList()

    public abstract List<? extends AnyOrBuilder> getExtensionsOrBuilderList()

Supports extensions for advanced use cases, such as logs and metrics.

`repeated .google.protobuf.Any extensions = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.protobuf.AnyOrBuilder>` |   |

### getOrigin()

    public abstract AttributeContext.Peer getOrigin()

The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the `source` and the `origin` must have the same content.

`.google.rpc.context.AttributeContext.Peer origin = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Peer` | The origin. |

### getOriginOrBuilder()

    public abstract AttributeContext.PeerOrBuilder getOriginOrBuilder()

The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the `source` and the `origin` must have the same content.

`.google.rpc.context.AttributeContext.Peer origin = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.PeerOrBuilder` |   |

### getRequest()

    public abstract AttributeContext.Request getRequest()

Represents a network request, such as an HTTP request.

`.google.rpc.context.AttributeContext.Request request = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Request` | The request. |

### getRequestOrBuilder()

    public abstract AttributeContext.RequestOrBuilder getRequestOrBuilder()

Represents a network request, such as an HTTP request.

`.google.rpc.context.AttributeContext.Request request = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.RequestOrBuilder` |   |

### getResource()

    public abstract AttributeContext.Resource getResource()

Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.

`.google.rpc.context.AttributeContext.Resource resource = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Resource` | The resource. |

### getResourceOrBuilder()

    public abstract AttributeContext.ResourceOrBuilder getResourceOrBuilder()

Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.

`.google.rpc.context.AttributeContext.Resource resource = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.ResourceOrBuilder` |   |

### getResponse()

    public abstract AttributeContext.Response getResponse()

Represents a network response, such as an HTTP response.

`.google.rpc.context.AttributeContext.Response response = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Response` | The response. |

### getResponseOrBuilder()

    public abstract AttributeContext.ResponseOrBuilder getResponseOrBuilder()

Represents a network response, such as an HTTP response.

`.google.rpc.context.AttributeContext.Response response = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.ResponseOrBuilder` |   |

### getSource()

    public abstract AttributeContext.Peer getSource()

The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.

`.google.rpc.context.AttributeContext.Peer source = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.Peer` | The source. |

### getSourceOrBuilder()

    public abstract AttributeContext.PeerOrBuilder getSourceOrBuilder()

The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.

`.google.rpc.context.AttributeContext.Peer source = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.context.AttributeContext.PeerOrBuilder` |   |

### hasApi()

    public abstract boolean hasApi()

Represents an API operation that is involved to a network activity.

`.google.rpc.context.AttributeContext.Api api = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the api field is set. |

### hasDestination()

    public abstract boolean hasDestination()

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.

`.google.rpc.context.AttributeContext.Peer destination = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the destination field is set. |

### hasOrigin()

    public abstract boolean hasOrigin()

The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the `source` and the `origin` must have the same content.

`.google.rpc.context.AttributeContext.Peer origin = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the origin field is set. |

### hasRequest()

    public abstract boolean hasRequest()

Represents a network request, such as an HTTP request.

`.google.rpc.context.AttributeContext.Request request = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the request field is set. |

### hasResource()

    public abstract boolean hasResource()

Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.

`.google.rpc.context.AttributeContext.Resource resource = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the resource field is set. |

### hasResponse()

    public abstract boolean hasResponse()

Represents a network response, such as an HTTP response.

`.google.rpc.context.AttributeContext.Response response = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the response field is set. |

### hasSource()

    public abstract boolean hasSource()

The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.

`.google.rpc.context.AttributeContext.Peer source = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the source field is set. |