Class HttpRoute.HeaderModifier.Builder (0.9.0)

public static final class HttpRoute.HeaderModifier.Builder extends GeneratedMessageV3.Builder<HttpRoute.HeaderModifier.Builder> implements HttpRoute.HeaderModifierOrBuilder

The specification for modifying HTTP header in HTTP request and HTTP response.

Protobuf type google.cloud.networkservices.v1.HttpRoute.HeaderModifier

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRemove(Iterable<String> values)

public HttpRoute.HeaderModifier.Builder addAllRemove(Iterable<String> values)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameter
Name Description
values Iterable<String>

The remove to add.

Returns
Type Description
HttpRoute.HeaderModifier.Builder

This builder for chaining.

addRemove(String value)

public HttpRoute.HeaderModifier.Builder addRemove(String value)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameter
Name Description
value String

The remove to add.

Returns
Type Description
HttpRoute.HeaderModifier.Builder

This builder for chaining.

addRemoveBytes(ByteString value)

public HttpRoute.HeaderModifier.Builder addRemoveBytes(ByteString value)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameter
Name Description
value ByteString

The bytes of the remove to add.

Returns
Type Description
HttpRoute.HeaderModifier.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderModifier.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

build()

public HttpRoute.HeaderModifier build()
Returns
Type Description
HttpRoute.HeaderModifier

buildPartial()

public HttpRoute.HeaderModifier buildPartial()
Returns
Type Description
HttpRoute.HeaderModifier

clear()

public HttpRoute.HeaderModifier.Builder clear()
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

clearAdd()

public HttpRoute.HeaderModifier.Builder clearAdd()
Returns
Type Description
HttpRoute.HeaderModifier.Builder

clearField(Descriptors.FieldDescriptor field)

public HttpRoute.HeaderModifier.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpRoute.HeaderModifier.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

clearRemove()

public HttpRoute.HeaderModifier.Builder clearRemove()

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Returns
Type Description
HttpRoute.HeaderModifier.Builder

This builder for chaining.

clearSet()

public HttpRoute.HeaderModifier.Builder clearSet()
Returns
Type Description
HttpRoute.HeaderModifier.Builder

clone()

public HttpRoute.HeaderModifier.Builder clone()
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

containsAdd(String key)

public boolean containsAdd(String key)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsSet(String key)

public boolean containsSet(String key)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAdd() (deprecated)

public Map<String,String> getAdd()

Use #getAddMap() instead.

Returns
Type Description
Map<String,String>

getAddCount()

public int getAddCount()

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Returns
Type Description
int

getAddMap()

public Map<String,String> getAddMap()

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Returns
Type Description
Map<String,String>

getAddOrDefault(String key, String defaultValue)

public String getAddOrDefault(String key, String defaultValue)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAddOrThrow(String key)

public String getAddOrThrow(String key)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameter
Name Description
key String
Returns
Type Description
String

getDefaultInstanceForType()

public HttpRoute.HeaderModifier getDefaultInstanceForType()
Returns
Type Description
HttpRoute.HeaderModifier

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableAdd() (deprecated)

public Map<String,String> getMutableAdd()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableSet() (deprecated)

public Map<String,String> getMutableSet()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getRemove(int index)

public String getRemove(int index)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The remove at the given index.

getRemoveBytes(int index)

public ByteString getRemoveBytes(int index)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the remove at the given index.

getRemoveCount()

public int getRemoveCount()

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Returns
Type Description
int

The count of remove.

getRemoveList()

public ProtocolStringList getRemoveList()

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Returns
Type Description
ProtocolStringList

A list containing the remove.

getSet() (deprecated)

public Map<String,String> getSet()

Use #getSetMap() instead.

Returns
Type Description
Map<String,String>

getSetCount()

public int getSetCount()

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Returns
Type Description
int

getSetMap()

public Map<String,String> getSetMap()

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Returns
Type Description
Map<String,String>

getSetOrDefault(String key, String defaultValue)

public String getSetOrDefault(String key, String defaultValue)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getSetOrThrow(String key)

public String getSetOrThrow(String key)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameter
Name Description
key String
Returns
Type Description
String

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HttpRoute.HeaderModifier other)

public HttpRoute.HeaderModifier.Builder mergeFrom(HttpRoute.HeaderModifier other)
Parameter
Name Description
other HttpRoute.HeaderModifier
Returns
Type Description
HttpRoute.HeaderModifier.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HttpRoute.HeaderModifier.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HttpRoute.HeaderModifier.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderModifier.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

putAdd(String key, String value)

public HttpRoute.HeaderModifier.Builder putAdd(String key, String value)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameters
Name Description
key String
value String
Returns
Type Description
HttpRoute.HeaderModifier.Builder

putAllAdd(Map<String,String> values)

public HttpRoute.HeaderModifier.Builder putAllAdd(Map<String,String> values)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
HttpRoute.HeaderModifier.Builder

putAllSet(Map<String,String> values)

public HttpRoute.HeaderModifier.Builder putAllSet(Map<String,String> values)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
HttpRoute.HeaderModifier.Builder

putSet(String key, String value)

public HttpRoute.HeaderModifier.Builder putSet(String key, String value)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameters
Name Description
key String
value String
Returns
Type Description
HttpRoute.HeaderModifier.Builder

removeAdd(String key)

public HttpRoute.HeaderModifier.Builder removeAdd(String key)

Add the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> add = 2;

Parameter
Name Description
key String
Returns
Type Description
HttpRoute.HeaderModifier.Builder

removeSet(String key)

public HttpRoute.HeaderModifier.Builder removeSet(String key)

Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.

map<string, string> set = 1;

Parameter
Name Description
key String
Returns
Type Description
HttpRoute.HeaderModifier.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderModifier.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

setRemove(int index, String value)

public HttpRoute.HeaderModifier.Builder setRemove(int index, String value)

Remove headers (matching by header names) specified in the list.

repeated string remove = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The remove to set.

Returns
Type Description
HttpRoute.HeaderModifier.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public HttpRoute.HeaderModifier.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderModifier.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.HeaderModifier.Builder
Overrides