Class AlertPolicy.Documentation.Builder (3.42.0)

public static final class AlertPolicy.Documentation.Builder extends GeneratedMessageV3.Builder<AlertPolicy.Documentation.Builder> implements AlertPolicy.DocumentationOrBuilder

A content string and a MIME type that describes the content string's format.

Protobuf type google.monitoring.v3.AlertPolicy.Documentation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AlertPolicy.Documentation build()
Returns
TypeDescription
AlertPolicy.Documentation

buildPartial()

public AlertPolicy.Documentation buildPartial()
Returns
TypeDescription
AlertPolicy.Documentation

clear()

public AlertPolicy.Documentation.Builder clear()
Returns
TypeDescription
AlertPolicy.Documentation.Builder
Overrides

clearContent()

public AlertPolicy.Documentation.Builder clearContent()

The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables.

string content = 1;

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMimeType()

public AlertPolicy.Documentation.Builder clearMimeType()

The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown for more information.

string mime_type = 2;

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSubject()

public AlertPolicy.Documentation.Builder clearSubject()

Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread. It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).

The contents of the subject line can be templatized by using variables. If this field is missing or empty, a default subject line will be generated.

string subject = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

clone()

public AlertPolicy.Documentation.Builder clone()
Returns
TypeDescription
AlertPolicy.Documentation.Builder
Overrides

getContent()

public String getContent()

The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables.

string content = 1;

Returns
TypeDescription
String

The content.

getContentBytes()

public ByteString getContentBytes()

The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables.

string content = 1;

Returns
TypeDescription
ByteString

The bytes for content.

getDefaultInstanceForType()

public AlertPolicy.Documentation getDefaultInstanceForType()
Returns
TypeDescription
AlertPolicy.Documentation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMimeType()

public String getMimeType()

The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown for more information.

string mime_type = 2;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown for more information.

string mime_type = 2;

Returns
TypeDescription
ByteString

The bytes for mimeType.

getSubject()

public String getSubject()

Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread. It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).

The contents of the subject line can be templatized by using variables. If this field is missing or empty, a default subject line will be generated.

string subject = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The subject.

getSubjectBytes()

public ByteString getSubjectBytes()

Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread. It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).

The contents of the subject line can be templatized by using variables. If this field is missing or empty, a default subject line will be generated.

string subject = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for subject.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AlertPolicy.Documentation other)

public AlertPolicy.Documentation.Builder mergeFrom(AlertPolicy.Documentation other)
Parameter
NameDescription
otherAlertPolicy.Documentation
Returns
TypeDescription
AlertPolicy.Documentation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContent(String value)

public AlertPolicy.Documentation.Builder setContent(String value)

The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables.

string content = 1;

Parameter
NameDescription
valueString

The content to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

setContentBytes(ByteString value)

public AlertPolicy.Documentation.Builder setContentBytes(ByteString value)

The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables.

string content = 1;

Parameter
NameDescription
valueByteString

The bytes for content to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMimeType(String value)

public AlertPolicy.Documentation.Builder setMimeType(String value)

The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown for more information.

string mime_type = 2;

Parameter
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public AlertPolicy.Documentation.Builder setMimeTypeBytes(ByteString value)

The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown for more information.

string mime_type = 2;

Parameter
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

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

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

setSubject(String value)

public AlertPolicy.Documentation.Builder setSubject(String value)

Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread. It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).

The contents of the subject line can be templatized by using variables. If this field is missing or empty, a default subject line will be generated.

string subject = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The subject to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

setSubjectBytes(ByteString value)

public AlertPolicy.Documentation.Builder setSubjectBytes(ByteString value)

Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread. It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).

The contents of the subject line can be templatized by using variables. If this field is missing or empty, a default subject line will be generated.

string subject = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for subject to set.

Returns
TypeDescription
AlertPolicy.Documentation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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