/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder clearSpans() { if (spansBuilder_ == null) { spans_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { spansBuilder_.clear(); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addSpans(com.google.devtools.cloudtrace.v2.Span value) { if (spansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpansIsMutable(); spans_.add(value); onChanged(); } else { spansBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addSpans(int index, com.google.devtools.cloudtrace.v2.Span value) { if (spansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpansIsMutable(); spans_.add(index, value); onChanged(); } else { spansBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder removeSpans(int index) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.remove(index); onChanged(); } else { spansBuilder_.remove(index); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder clearSpans() { if (spansBuilder_ == null) { spans_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { spansBuilder_.clear(); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addSpans( int index, com.google.devtools.cloudtrace.v2.Span.Builder builderForValue) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.add(index, builderForValue.build()); onChanged(); } else { spansBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder setSpans( int index, com.google.devtools.cloudtrace.v2.Span.Builder builderForValue) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.set(index, builderForValue.build()); onChanged(); } else { spansBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder setSpans(int index, com.google.devtools.cloudtrace.v2.Span value) { if (spansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSpansIsMutable(); spans_.set(index, value); onChanged(); } else { spansBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder setSpans( int index, com.google.devtools.cloudtrace.v2.Span.Builder builderForValue) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.set(index, builderForValue.build()); onChanged(); } else { spansBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder removeSpans(int index) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.remove(index); onChanged(); } else { spansBuilder_.remove(index); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addAllSpans( java.lang.Iterable<? extends com.google.devtools.cloudtrace.v2.Span> values) { if (spansBuilder_ == null) { ensureSpansIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spans_); onChanged(); } else { spansBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addSpans(com.google.devtools.cloudtrace.v2.Span.Builder builderForValue) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.add(builderForValue.build()); onChanged(); } else { spansBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * A list of new spans. The span names must not match existing * spans, or the results are undefined. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span spans = 2;</code> */ public Builder addSpans( int index, com.google.devtools.cloudtrace.v2.Span.Builder builderForValue) { if (spansBuilder_ == null) { ensureSpansIsMutable(); spans_.add(index, builderForValue.build()); onChanged(); } else { spansBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * * * <pre> * Required. The name of the project where the spans belong. The format is * `projects/[PROJECT_ID]`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**