Class Browser.Cookie.Builder (0.3.0)

public static final class Browser.Cookie.Builder extends GeneratedMessage.Builder<Browser.Cookie.Builder> implements Browser.CookieOrBuilder

Browser cookie.

Protobuf type google.backstory.Browser.Cookie

Static Methods

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

Methods

public Browser.Cookie build()
Returns
Type Description
Browser.Cookie
public Browser.Cookie buildPartial()
Returns
Type Description
Browser.Cookie
public Browser.Cookie.Builder clear()
Returns
Type Description
Browser.Cookie.Builder
Overrides
public Browser.Cookie.Builder clearDomain()

The domain for which the cookie is valid.

string domain = 3;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearExpirationTime()

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Returns
Type Description
Browser.Cookie.Builder
public Browser.Cookie.Builder clearHttpOnly()

Indicates if the cookie is inaccessible via client-side scripts (e.g., JavaScript).

bool http_only = 6;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearMaxAge()

The maximum age of the cookie in seconds.

int64 max_age = 8;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearName()

The unique name identifying the cookie.

string name = 1;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearPartitioned()

Shows if the cookies is stored using partitioned storage.

bool partitioned = 11;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearPath()

The URL path for which the cookie is valid.

string path = 4;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearSameSite()

Affects cross-site request behavior.

.google.backstory.Browser.Cookie.CookieSameSite same_site = 9;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearSecure()

Indicates if the cookie should only be sent over secure HTTPS connections.

bool secure = 7;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearSession()

Indicates if the cookie is persistent.

bool session = 10;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder clearValue()

The data stored within the cookie.

string value = 2;

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie getDefaultInstanceForType()
Returns
Type Description
Browser.Cookie
public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides
public String getDomain()

The domain for which the cookie is valid.

string domain = 3;

Returns
Type Description
String

The domain.

public ByteString getDomainBytes()

The domain for which the cookie is valid.

string domain = 3;

Returns
Type Description
ByteString

The bytes for domain.

public Timestamp getExpirationTime()

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Returns
Type Description
Timestamp

The expirationTime.

public Timestamp.Builder getExpirationTimeBuilder()

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Returns
Type Description
Builder
public TimestampOrBuilder getExpirationTimeOrBuilder()

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Returns
Type Description
TimestampOrBuilder
public boolean getHttpOnly()

Indicates if the cookie is inaccessible via client-side scripts (e.g., JavaScript).

bool http_only = 6;

Returns
Type Description
boolean

The httpOnly.

public long getMaxAge()

The maximum age of the cookie in seconds.

int64 max_age = 8;

Returns
Type Description
long

The maxAge.

public String getName()

The unique name identifying the cookie.

string name = 1;

Returns
Type Description
String

The name.

public ByteString getNameBytes()

The unique name identifying the cookie.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

public boolean getPartitioned()

Shows if the cookies is stored using partitioned storage.

bool partitioned = 11;

Returns
Type Description
boolean

The partitioned.

public String getPath()

The URL path for which the cookie is valid.

string path = 4;

Returns
Type Description
String

The path.

public ByteString getPathBytes()

The URL path for which the cookie is valid.

string path = 4;

Returns
Type Description
ByteString

The bytes for path.

public Browser.Cookie.CookieSameSite getSameSite()

Affects cross-site request behavior.

.google.backstory.Browser.Cookie.CookieSameSite same_site = 9;

Returns
Type Description
Browser.Cookie.CookieSameSite

The sameSite.

public int getSameSiteValue()

Affects cross-site request behavior.

.google.backstory.Browser.Cookie.CookieSameSite same_site = 9;

Returns
Type Description
int

The enum numeric value on the wire for sameSite.

public boolean getSecure()

Indicates if the cookie should only be sent over secure HTTPS connections.

bool secure = 7;

Returns
Type Description
boolean

The secure.

public boolean getSession()

Indicates if the cookie is persistent.

bool session = 10;

Returns
Type Description
boolean

The session.

public String getValue()

The data stored within the cookie.

string value = 2;

Returns
Type Description
String

The value.

public ByteString getValueBytes()

The data stored within the cookie.

string value = 2;

Returns
Type Description
ByteString

The bytes for value.

public boolean hasExpirationTime()

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Returns
Type Description
boolean

Whether the expirationTime field is set.

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public Browser.Cookie.Builder mergeExpirationTime(Timestamp value)

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Browser.Cookie.Builder
public Browser.Cookie.Builder mergeFrom(Browser.Cookie other)
Parameter
Name Description
other Browser.Cookie
Returns
Type Description
Browser.Cookie.Builder
public Browser.Cookie.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Browser.Cookie.Builder
Overrides
Exceptions
Type Description
IOException
public Browser.Cookie.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Browser.Cookie.Builder
Overrides
public Browser.Cookie.Builder setDomain(String value)

The domain for which the cookie is valid.

string domain = 3;

Parameter
Name Description
value String

The domain to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setDomainBytes(ByteString value)

The domain for which the cookie is valid.

string domain = 3;

Parameter
Name Description
value ByteString

The bytes for domain to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setExpirationTime(Timestamp value)

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Browser.Cookie.Builder
public Browser.Cookie.Builder setExpirationTime(Timestamp.Builder builderForValue)

The date and time when the cookie will expire.

.google.protobuf.Timestamp expiration_time = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Browser.Cookie.Builder
public Browser.Cookie.Builder setHttpOnly(boolean value)

Indicates if the cookie is inaccessible via client-side scripts (e.g., JavaScript).

bool http_only = 6;

Parameter
Name Description
value boolean

The httpOnly to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setMaxAge(long value)

The maximum age of the cookie in seconds.

int64 max_age = 8;

Parameter
Name Description
value long

The maxAge to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setName(String value)

The unique name identifying the cookie.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setNameBytes(ByteString value)

The unique name identifying the cookie.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setPartitioned(boolean value)

Shows if the cookies is stored using partitioned storage.

bool partitioned = 11;

Parameter
Name Description
value boolean

The partitioned to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setPath(String value)

The URL path for which the cookie is valid.

string path = 4;

Parameter
Name Description
value String

The path to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setPathBytes(ByteString value)

The URL path for which the cookie is valid.

string path = 4;

Parameter
Name Description
value ByteString

The bytes for path to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setSameSite(Browser.Cookie.CookieSameSite value)

Affects cross-site request behavior.

.google.backstory.Browser.Cookie.CookieSameSite same_site = 9;

Parameter
Name Description
value Browser.Cookie.CookieSameSite

The sameSite to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setSameSiteValue(int value)

Affects cross-site request behavior.

.google.backstory.Browser.Cookie.CookieSameSite same_site = 9;

Parameter
Name Description
value int

The enum numeric value on the wire for sameSite to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setSecure(boolean value)

Indicates if the cookie should only be sent over secure HTTPS connections.

bool secure = 7;

Parameter
Name Description
value boolean

The secure to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setSession(boolean value)

Indicates if the cookie is persistent.

bool session = 10;

Parameter
Name Description
value boolean

The session to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setValue(String value)

The data stored within the cookie.

string value = 2;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.

public Browser.Cookie.Builder setValueBytes(ByteString value)

The data stored within the cookie.

string value = 2;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Browser.Cookie.Builder

This builder for chaining.