public static final class StartSession.Builder extends GeneratedMessage.Builder<StartSession.Builder> implements StartSessionOrBuilderStart a new session. The client must send this as the first message to the server to start a new session. The client may immediately send Data messages without waiting for a reply from the server.
Protobuf type google.cloud.sql.v1beta4.StartSession
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > StartSession.BuilderImplements
StartSessionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public StartSession build()| Returns | |
|---|---|
| Type | Description |
StartSession |
|
buildPartial()
public StartSession buildPartial()| Returns | |
|---|---|
| Type | Description |
StartSession |
|
clear()
public StartSession.Builder clear()| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
|
clearInstanceId()
public StartSession.Builder clearInstanceId()Required. The Cloud SQL instance resource name, for example: projects/example-project/instances/example-instance
string instance_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
clearLocationId()
public StartSession.Builder clearLocationId() Required. location_id is used to route the
request to a specific region. Use the same region which was used to create
the instance. Use the format locations/{location}, for example:
locations/us-central1.
string location_id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
clearSessionId()
public StartSession.Builder clearSessionId()Optional. The session id, chosen by the client. This should be an unguessable string. If the client does not intend to reconnect to this session, the client may leave session_id unset.
string session_id = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public StartSession getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
StartSession |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getInstanceId()
public String getInstanceId()Required. The Cloud SQL instance resource name, for example: projects/example-project/instances/example-instance
string instance_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The instanceId. |
getInstanceIdBytes()
public ByteString getInstanceIdBytes()Required. The Cloud SQL instance resource name, for example: projects/example-project/instances/example-instance
string instance_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for instanceId. |
getLocationId()
public String getLocationId() Required. location_id is used to route the
request to a specific region. Use the same region which was used to create
the instance. Use the format locations/{location}, for example:
locations/us-central1.
string location_id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The locationId. |
getLocationIdBytes()
public ByteString getLocationIdBytes() Required. location_id is used to route the
request to a specific region. Use the same region which was used to create
the instance. Use the format locations/{location}, for example:
locations/us-central1.
string location_id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for locationId. |
getSessionId()
public String getSessionId()Optional. The session id, chosen by the client. This should be an unguessable string. If the client does not intend to reconnect to this session, the client may leave session_id unset.
string session_id = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The sessionId. |
getSessionIdBytes()
public ByteString getSessionIdBytes()Optional. The session id, chosen by the client. This should be an unguessable string. If the client does not intend to reconnect to this session, the client may leave session_id unset.
string session_id = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for sessionId. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(StartSession other)
public StartSession.Builder mergeFrom(StartSession other)| Parameter | |
|---|---|
| Name | Description |
other |
StartSession |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public StartSession.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public StartSession.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
|
setInstanceId(String value)
public StartSession.Builder setInstanceId(String value)Required. The Cloud SQL instance resource name, for example: projects/example-project/instances/example-instance
string instance_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe instanceId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
setInstanceIdBytes(ByteString value)
public StartSession.Builder setInstanceIdBytes(ByteString value)Required. The Cloud SQL instance resource name, for example: projects/example-project/instances/example-instance
string instance_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for instanceId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
setLocationId(String value)
public StartSession.Builder setLocationId(String value) Required. location_id is used to route the
request to a specific region. Use the same region which was used to create
the instance. Use the format locations/{location}, for example:
locations/us-central1.
string location_id = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe locationId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
setLocationIdBytes(ByteString value)
public StartSession.Builder setLocationIdBytes(ByteString value) Required. location_id is used to route the
request to a specific region. Use the same region which was used to create
the instance. Use the format locations/{location}, for example:
locations/us-central1.
string location_id = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for locationId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
setSessionId(String value)
public StartSession.Builder setSessionId(String value)Optional. The session id, chosen by the client. This should be an unguessable string. If the client does not intend to reconnect to this session, the client may leave session_id unset.
string session_id = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe sessionId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |
setSessionIdBytes(ByteString value)
public StartSession.Builder setSessionIdBytes(ByteString value)Optional. The session id, chosen by the client. This should be an unguessable string. If the client does not intend to reconnect to this session, the client may leave session_id unset.
string session_id = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for sessionId to set. |
| Returns | |
|---|---|
| Type | Description |
StartSession.Builder |
This builder for chaining. |