/** * * * <pre> * Documentation that is included with notifications and incidents related to * this policy. Best practice is for the documentation to include information * to help responders understand, mitigate, escalate, and correct the * underlying problems detected by the alerting policy. Notification channels * that have limited capacity might not show this documentation. * </pre> * * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code> */ public Builder setDocumentation( com.google.monitoring.v3.AlertPolicy.Documentation.Builder builderForValue) { if (documentationBuilder_ == null) { documentation_ = builderForValue.build(); onChanged(); } else { documentationBuilder_.setMessage(builderForValue.build()); } return this; } /**
extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(documentation_); documentation_ = subBuilder.buildPartial();
public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.Documentation other) { if (other == com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()) return this; if (!other.getContent().isEmpty()) { content_ = other.content_; onChanged(); } if (!other.getMimeType().isEmpty()) { mimeType_ = other.mimeType_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * Documentation that is included with notifications and incidents related to * this policy. Best practice is for the documentation to include information * to help responders understand, mitigate, escalate, and correct the * underlying problems detected by the alerting policy. Notification channels * that have limited capacity might not show this documentation. * </pre> * * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code> */ public Builder mergeDocumentation(com.google.monitoring.v3.AlertPolicy.Documentation value) { if (documentationBuilder_ == null) { if (documentation_ != null) { documentation_ = com.google.monitoring.v3.AlertPolicy.Documentation.newBuilder(documentation_) .mergeFrom(value) .buildPartial(); } else { documentation_ = value; } onChanged(); } else { documentationBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The text 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. * </pre> * * <code>string content = 1;</code> */ public Builder setContentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); content_ = value; onChanged(); return this; }
/** * * * <pre> * The format of the `content` field. Presently, only the value * `"text/markdown"` is supported. See * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. * </pre> * * <code>string mime_type = 2;</code> */ public Builder setMimeType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } mimeType_ = value; onChanged(); return this; } /**
/** * * * <pre> * The text 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. * </pre> * * <code>string content = 1;</code> */ public Builder setContent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } content_ = value; onChanged(); return this; } /**
/** * * * <pre> * The format of the `content` field. Presently, only the value * `"text/markdown"` is supported. See * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. * </pre> * * <code>string mime_type = 2;</code> */ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); mimeType_ = value; onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.monitoring.v3.AlertPolicy.Documentation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.monitoring.v3.AlertPolicy.Documentation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The format of the `content` field. Presently, only the value * `"text/markdown"` is supported. See * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. * </pre> * * <code>string mime_type = 2;</code> */ public Builder clearMimeType() { mimeType_ = getDefaultInstance().getMimeType(); onChanged(); return this; } /**
/** * * * <pre> * The text 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. * </pre> * * <code>string content = 1;</code> */ public Builder clearContent() { content_ = getDefaultInstance().getContent(); onChanged(); return this; } /**
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(com.google.monitoring.v3.AlertPolicy.Documentation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public com.google.monitoring.v3.AlertPolicy.Documentation build() { com.google.monitoring.v3.AlertPolicy.Documentation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.monitoring.v3.AlertPolicy.Documentation buildPartial() { com.google.monitoring.v3.AlertPolicy.Documentation result = new com.google.monitoring.v3.AlertPolicy.Documentation(this); result.content_ = content_; result.mimeType_ = mimeType_; onBuilt(); return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.monitoring.v3.AlertPolicy.Documentation) { return mergeFrom((com.google.monitoring.v3.AlertPolicy.Documentation) other); } else { super.mergeFrom(other); return this; } }