Class ServerKeyRestrictions.Builder (0.5.0)

public static final class ServerKeyRestrictions.Builder extends GeneratedMessageV3.Builder<ServerKeyRestrictions.Builder> implements ServerKeyRestrictionsOrBuilder

The IP addresses of callers that are allowed to use the key.

Protobuf type google.api.apikeys.v2.ServerKeyRestrictions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAllowedIps(Iterable<String> values)

public ServerKeyRestrictions.Builder addAllAllowedIps(Iterable<String> values)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
valuesIterable<String>

The allowedIps to add.

Returns
TypeDescription
ServerKeyRestrictions.Builder

This builder for chaining.

addAllowedIps(String value)

public ServerKeyRestrictions.Builder addAllowedIps(String value)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
valueString

The allowedIps to add.

Returns
TypeDescription
ServerKeyRestrictions.Builder

This builder for chaining.

addAllowedIpsBytes(ByteString value)

public ServerKeyRestrictions.Builder addAllowedIpsBytes(ByteString value)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
valueByteString

The bytes of the allowedIps to add.

Returns
TypeDescription
ServerKeyRestrictions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServerKeyRestrictions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

build()

public ServerKeyRestrictions build()
Returns
TypeDescription
ServerKeyRestrictions

buildPartial()

public ServerKeyRestrictions buildPartial()
Returns
TypeDescription
ServerKeyRestrictions

clear()

public ServerKeyRestrictions.Builder clear()
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

clearAllowedIps()

public ServerKeyRestrictions.Builder clearAllowedIps()

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Returns
TypeDescription
ServerKeyRestrictions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ServerKeyRestrictions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ServerKeyRestrictions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

clone()

public ServerKeyRestrictions.Builder clone()
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

getAllowedIps(int index)

public String getAllowedIps(int index)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowedIps at the given index.

getAllowedIpsBytes(int index)

public ByteString getAllowedIpsBytes(int index)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowedIps at the given index.

getAllowedIpsCount()

public int getAllowedIpsCount()

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Returns
TypeDescription
int

The count of allowedIps.

getAllowedIpsList()

public ProtocolStringList getAllowedIpsList()

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the allowedIps.

getDefaultInstanceForType()

public ServerKeyRestrictions getDefaultInstanceForType()
Returns
TypeDescription
ServerKeyRestrictions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ServerKeyRestrictions other)

public ServerKeyRestrictions.Builder mergeFrom(ServerKeyRestrictions other)
Parameter
NameDescription
otherServerKeyRestrictions
Returns
TypeDescription
ServerKeyRestrictions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServerKeyRestrictions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ServerKeyRestrictions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServerKeyRestrictions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

setAllowedIps(int index, String value)

public ServerKeyRestrictions.Builder setAllowedIps(int index, String value)

A list of the caller IP addresses that are allowed to make API calls with this key.

repeated string allowed_ips = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The allowedIps to set.

Returns
TypeDescription
ServerKeyRestrictions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ServerKeyRestrictions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

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

public ServerKeyRestrictions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ServerKeyRestrictions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServerKeyRestrictions.Builder
Overrides