org.tensorflow.framework.Trace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto Show documentation
Show all versions of proto Show documentation
Java API for TensorFlow protocol buffers.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/trace_events.proto
package org.tensorflow.framework;
/**
*
* A 'Trace' contains metadata for the individual traces of a system.
*
*
* Protobuf type {@code tensorflow.profiler.Trace}
*/
public final class Trace extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.profiler.Trace)
TraceOrBuilder {
private static final long serialVersionUID = 0L;
// Use Trace.newBuilder() to construct.
private Trace(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Trace() {
traceEvents_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Trace(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
devices_ = com.google.protobuf.MapField.newMapField(
DevicesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
devices__ = input.readMessage(
DevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
devices_.getMutableMap().put(
devices__.getKey(), devices__.getValue());
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
traceEvents_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
traceEvents_.add(
input.readMessage(org.tensorflow.framework.TraceEvent.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
traceEvents_ = java.util.Collections.unmodifiableList(traceEvents_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetDevices();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.Trace.class, org.tensorflow.framework.Trace.Builder.class);
}
public static final int DEVICES_FIELD_NUMBER = 1;
private static final class DevicesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, org.tensorflow.framework.Device> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_DevicesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.UINT32,
0,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
org.tensorflow.framework.Device.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Integer, org.tensorflow.framework.Device> devices_;
private com.google.protobuf.MapField
internalGetDevices() {
if (devices_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DevicesDefaultEntryHolder.defaultEntry);
}
return devices_;
}
public int getDevicesCount() {
return internalGetDevices().getMap().size();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public boolean containsDevices(
int key) {
return internalGetDevices().getMap().containsKey(key);
}
/**
* Use {@link #getDevicesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDevices() {
return getDevicesMap();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public java.util.Map getDevicesMap() {
return internalGetDevices().getMap();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public org.tensorflow.framework.Device getDevicesOrDefault(
int key,
org.tensorflow.framework.Device defaultValue) {
java.util.Map map =
internalGetDevices().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public org.tensorflow.framework.Device getDevicesOrThrow(
int key) {
java.util.Map map =
internalGetDevices().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TRACE_EVENTS_FIELD_NUMBER = 4;
private java.util.List traceEvents_;
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public java.util.List getTraceEventsList() {
return traceEvents_;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public java.util.List extends org.tensorflow.framework.TraceEventOrBuilder>
getTraceEventsOrBuilderList() {
return traceEvents_;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public int getTraceEventsCount() {
return traceEvents_.size();
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEvent getTraceEvents(int index) {
return traceEvents_.get(index);
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEventOrBuilder getTraceEventsOrBuilder(
int index) {
return traceEvents_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetDevices(),
DevicesDefaultEntryHolder.defaultEntry,
1);
for (int i = 0; i < traceEvents_.size(); i++) {
output.writeMessage(4, traceEvents_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetDevices().getMap().entrySet()) {
com.google.protobuf.MapEntry
devices__ = DevicesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, devices__);
}
for (int i = 0; i < traceEvents_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, traceEvents_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.Trace)) {
return super.equals(obj);
}
org.tensorflow.framework.Trace other = (org.tensorflow.framework.Trace) obj;
boolean result = true;
result = result && internalGetDevices().equals(
other.internalGetDevices());
result = result && getTraceEventsList()
.equals(other.getTraceEventsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetDevices().getMap().isEmpty()) {
hash = (37 * hash) + DEVICES_FIELD_NUMBER;
hash = (53 * hash) + internalGetDevices().hashCode();
}
if (getTraceEventsCount() > 0) {
hash = (37 * hash) + TRACE_EVENTS_FIELD_NUMBER;
hash = (53 * hash) + getTraceEventsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.Trace parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.Trace parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.Trace parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.Trace parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.Trace parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.Trace parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.Trace parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.Trace parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.Trace parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.Trace parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.Trace parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.Trace parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.Trace prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A 'Trace' contains metadata for the individual traces of a system.
*
*
* Protobuf type {@code tensorflow.profiler.Trace}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.profiler.Trace)
org.tensorflow.framework.TraceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetDevices();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableDevices();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.Trace.class, org.tensorflow.framework.Trace.Builder.class);
}
// Construct using org.tensorflow.framework.Trace.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTraceEventsFieldBuilder();
}
}
public Builder clear() {
super.clear();
internalGetMutableDevices().clear();
if (traceEventsBuilder_ == null) {
traceEvents_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
traceEventsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Trace_descriptor;
}
public org.tensorflow.framework.Trace getDefaultInstanceForType() {
return org.tensorflow.framework.Trace.getDefaultInstance();
}
public org.tensorflow.framework.Trace build() {
org.tensorflow.framework.Trace result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.Trace buildPartial() {
org.tensorflow.framework.Trace result = new org.tensorflow.framework.Trace(this);
int from_bitField0_ = bitField0_;
result.devices_ = internalGetDevices();
result.devices_.makeImmutable();
if (traceEventsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
traceEvents_ = java.util.Collections.unmodifiableList(traceEvents_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.traceEvents_ = traceEvents_;
} else {
result.traceEvents_ = traceEventsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.Trace) {
return mergeFrom((org.tensorflow.framework.Trace)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.Trace other) {
if (other == org.tensorflow.framework.Trace.getDefaultInstance()) return this;
internalGetMutableDevices().mergeFrom(
other.internalGetDevices());
if (traceEventsBuilder_ == null) {
if (!other.traceEvents_.isEmpty()) {
if (traceEvents_.isEmpty()) {
traceEvents_ = other.traceEvents_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTraceEventsIsMutable();
traceEvents_.addAll(other.traceEvents_);
}
onChanged();
}
} else {
if (!other.traceEvents_.isEmpty()) {
if (traceEventsBuilder_.isEmpty()) {
traceEventsBuilder_.dispose();
traceEventsBuilder_ = null;
traceEvents_ = other.traceEvents_;
bitField0_ = (bitField0_ & ~0x00000002);
traceEventsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTraceEventsFieldBuilder() : null;
} else {
traceEventsBuilder_.addAllMessages(other.traceEvents_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.Trace parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.Trace) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.Integer, org.tensorflow.framework.Device> devices_;
private com.google.protobuf.MapField
internalGetDevices() {
if (devices_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DevicesDefaultEntryHolder.defaultEntry);
}
return devices_;
}
private com.google.protobuf.MapField
internalGetMutableDevices() {
onChanged();;
if (devices_ == null) {
devices_ = com.google.protobuf.MapField.newMapField(
DevicesDefaultEntryHolder.defaultEntry);
}
if (!devices_.isMutable()) {
devices_ = devices_.copy();
}
return devices_;
}
public int getDevicesCount() {
return internalGetDevices().getMap().size();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public boolean containsDevices(
int key) {
return internalGetDevices().getMap().containsKey(key);
}
/**
* Use {@link #getDevicesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDevices() {
return getDevicesMap();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public java.util.Map getDevicesMap() {
return internalGetDevices().getMap();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public org.tensorflow.framework.Device getDevicesOrDefault(
int key,
org.tensorflow.framework.Device defaultValue) {
java.util.Map map =
internalGetDevices().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public org.tensorflow.framework.Device getDevicesOrThrow(
int key) {
java.util.Map map =
internalGetDevices().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearDevices() {
internalGetMutableDevices().getMutableMap()
.clear();
return this;
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public Builder removeDevices(
int key) {
internalGetMutableDevices().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableDevices() {
return internalGetMutableDevices().getMutableMap();
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public Builder putDevices(
int key,
org.tensorflow.framework.Device value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDevices().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The devices that this trace has information about. Maps from device_id to
* more data about the specific device.
*
*
* map<uint32, .tensorflow.profiler.Device> devices = 1;
*/
public Builder putAllDevices(
java.util.Map values) {
internalGetMutableDevices().getMutableMap()
.putAll(values);
return this;
}
private java.util.List traceEvents_ =
java.util.Collections.emptyList();
private void ensureTraceEventsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
traceEvents_ = new java.util.ArrayList(traceEvents_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TraceEvent, org.tensorflow.framework.TraceEvent.Builder, org.tensorflow.framework.TraceEventOrBuilder> traceEventsBuilder_;
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public java.util.List getTraceEventsList() {
if (traceEventsBuilder_ == null) {
return java.util.Collections.unmodifiableList(traceEvents_);
} else {
return traceEventsBuilder_.getMessageList();
}
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public int getTraceEventsCount() {
if (traceEventsBuilder_ == null) {
return traceEvents_.size();
} else {
return traceEventsBuilder_.getCount();
}
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEvent getTraceEvents(int index) {
if (traceEventsBuilder_ == null) {
return traceEvents_.get(index);
} else {
return traceEventsBuilder_.getMessage(index);
}
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder setTraceEvents(
int index, org.tensorflow.framework.TraceEvent value) {
if (traceEventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTraceEventsIsMutable();
traceEvents_.set(index, value);
onChanged();
} else {
traceEventsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder setTraceEvents(
int index, org.tensorflow.framework.TraceEvent.Builder builderForValue) {
if (traceEventsBuilder_ == null) {
ensureTraceEventsIsMutable();
traceEvents_.set(index, builderForValue.build());
onChanged();
} else {
traceEventsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder addTraceEvents(org.tensorflow.framework.TraceEvent value) {
if (traceEventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTraceEventsIsMutable();
traceEvents_.add(value);
onChanged();
} else {
traceEventsBuilder_.addMessage(value);
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder addTraceEvents(
int index, org.tensorflow.framework.TraceEvent value) {
if (traceEventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTraceEventsIsMutable();
traceEvents_.add(index, value);
onChanged();
} else {
traceEventsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder addTraceEvents(
org.tensorflow.framework.TraceEvent.Builder builderForValue) {
if (traceEventsBuilder_ == null) {
ensureTraceEventsIsMutable();
traceEvents_.add(builderForValue.build());
onChanged();
} else {
traceEventsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder addTraceEvents(
int index, org.tensorflow.framework.TraceEvent.Builder builderForValue) {
if (traceEventsBuilder_ == null) {
ensureTraceEventsIsMutable();
traceEvents_.add(index, builderForValue.build());
onChanged();
} else {
traceEventsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder addAllTraceEvents(
java.lang.Iterable extends org.tensorflow.framework.TraceEvent> values) {
if (traceEventsBuilder_ == null) {
ensureTraceEventsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, traceEvents_);
onChanged();
} else {
traceEventsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder clearTraceEvents() {
if (traceEventsBuilder_ == null) {
traceEvents_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
traceEventsBuilder_.clear();
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public Builder removeTraceEvents(int index) {
if (traceEventsBuilder_ == null) {
ensureTraceEventsIsMutable();
traceEvents_.remove(index);
onChanged();
} else {
traceEventsBuilder_.remove(index);
}
return this;
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEvent.Builder getTraceEventsBuilder(
int index) {
return getTraceEventsFieldBuilder().getBuilder(index);
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEventOrBuilder getTraceEventsOrBuilder(
int index) {
if (traceEventsBuilder_ == null) {
return traceEvents_.get(index); } else {
return traceEventsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public java.util.List extends org.tensorflow.framework.TraceEventOrBuilder>
getTraceEventsOrBuilderList() {
if (traceEventsBuilder_ != null) {
return traceEventsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(traceEvents_);
}
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEvent.Builder addTraceEventsBuilder() {
return getTraceEventsFieldBuilder().addBuilder(
org.tensorflow.framework.TraceEvent.getDefaultInstance());
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public org.tensorflow.framework.TraceEvent.Builder addTraceEventsBuilder(
int index) {
return getTraceEventsFieldBuilder().addBuilder(
index, org.tensorflow.framework.TraceEvent.getDefaultInstance());
}
/**
*
* All trace events capturing in the profiling period.
*
*
* repeated .tensorflow.profiler.TraceEvent trace_events = 4;
*/
public java.util.List
getTraceEventsBuilderList() {
return getTraceEventsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TraceEvent, org.tensorflow.framework.TraceEvent.Builder, org.tensorflow.framework.TraceEventOrBuilder>
getTraceEventsFieldBuilder() {
if (traceEventsBuilder_ == null) {
traceEventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TraceEvent, org.tensorflow.framework.TraceEvent.Builder, org.tensorflow.framework.TraceEventOrBuilder>(
traceEvents_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
traceEvents_ = null;
}
return traceEventsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.profiler.Trace)
}
// @@protoc_insertion_point(class_scope:tensorflow.profiler.Trace)
private static final org.tensorflow.framework.Trace DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.Trace();
}
public static org.tensorflow.framework.Trace getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Trace parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Trace(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.Trace getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}