public static final class SpecContents.Builder extends GeneratedMessage.Builder<SpecContents.Builder> implements SpecContentsOrBuilderThe spec contents.
Protobuf type google.cloud.apihub.v1.SpecContents
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > SpecContents.BuilderImplements
SpecContentsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public SpecContents build()| Returns | |
|---|---|
| Type | Description |
SpecContents |
|
buildPartial()
public SpecContents buildPartial()| Returns | |
|---|---|
| Type | Description |
SpecContents |
|
clear()
public SpecContents.Builder clear()| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
|
clearContents()
public SpecContents.Builder clearContents()Required. The contents of the spec.
bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
This builder for chaining. |
clearMimeType()
public SpecContents.Builder clearMimeType()Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.
string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
This builder for chaining. |
getContents()
public ByteString getContents()Required. The contents of the spec.
bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The contents. |
getDefaultInstanceForType()
public SpecContents getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SpecContents |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getMimeType()
public String getMimeType()Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.
string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The mimeType. |
getMimeTypeBytes()
public ByteString getMimeTypeBytes()Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.
string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for mimeType. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(SpecContents other)
public SpecContents.Builder mergeFrom(SpecContents other)| Parameter | |
|---|---|
| Name | Description |
other |
SpecContents |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SpecContents.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public SpecContents.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
|
setContents(ByteString value)
public SpecContents.Builder setContents(ByteString value)Required. The contents of the spec.
bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe contents to set. |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
This builder for chaining. |
setMimeType(String value)
public SpecContents.Builder setMimeType(String value)Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.
string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe mimeType to set. |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
This builder for chaining. |
setMimeTypeBytes(ByteString value)
public SpecContents.Builder setMimeTypeBytes(ByteString value)Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.
string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for mimeType to set. |
| Returns | |
|---|---|
| Type | Description |
SpecContents.Builder |
This builder for chaining. |