Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* ConfusionMatrix
*
*
* Protobuf type {@code clarifai.api.ConfusionMatrix}
*/
public final class ConfusionMatrix extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ConfusionMatrix)
ConfusionMatrixOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConfusionMatrix.newBuilder() to construct.
private ConfusionMatrix(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConfusionMatrix() {
matrix_ = java.util.Collections.emptyList();
conceptIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConfusionMatrix();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConfusionMatrix(
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;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
matrix_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
matrix_.add(
input.readMessage(com.clarifai.grpc.api.ConfusionMatrixEntry.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
conceptIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
conceptIds_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
matrix_ = java.util.Collections.unmodifiableList(matrix_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
conceptIds_ = conceptIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConfusionMatrix_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConfusionMatrix_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ConfusionMatrix.class, com.clarifai.grpc.api.ConfusionMatrix.Builder.class);
}
public static final int MATRIX_FIELD_NUMBER = 1;
private java.util.List matrix_;
/**
* repeated .clarifai.api.ConfusionMatrixEntry matrix = 1;
*/
@java.lang.Override
public java.util.List getMatrixList() {
return matrix_;
}
/**
* repeated .clarifai.api.ConfusionMatrixEntry matrix = 1;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.ConfusionMatrixEntryOrBuilder>
getMatrixOrBuilderList() {
return matrix_;
}
/**
* repeated .clarifai.api.ConfusionMatrixEntry matrix = 1;
*/
@java.lang.Override
public int getMatrixCount() {
return matrix_.size();
}
/**
* repeated .clarifai.api.ConfusionMatrixEntry matrix = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.ConfusionMatrixEntry getMatrix(int index) {
return matrix_.get(index);
}
/**
* repeated .clarifai.api.ConfusionMatrixEntry matrix = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.ConfusionMatrixEntryOrBuilder getMatrixOrBuilder(
int index) {
return matrix_.get(index);
}
public static final int CONCEPT_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList conceptIds_;
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @return A list containing the conceptIds.
*/
public com.google.protobuf.ProtocolStringList
getConceptIdsList() {
return conceptIds_;
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @return The count of conceptIds.
*/
public int getConceptIdsCount() {
return conceptIds_.size();
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param index The index of the element to return.
* @return The conceptIds at the given index.
*/
public java.lang.String getConceptIds(int index) {
return conceptIds_.get(index);
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param index The index of the value to return.
* @return The bytes of the conceptIds at the given index.
*/
public com.google.protobuf.ByteString
getConceptIdsBytes(int index) {
return conceptIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < matrix_.size(); i++) {
output.writeMessage(1, matrix_.get(i));
}
for (int i = 0; i < conceptIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, conceptIds_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < matrix_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, matrix_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < conceptIds_.size(); i++) {
dataSize += computeStringSizeNoTag(conceptIds_.getRaw(i));
}
size += dataSize;
size += 1 * getConceptIdsList().size();
}
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 com.clarifai.grpc.api.ConfusionMatrix)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ConfusionMatrix other = (com.clarifai.grpc.api.ConfusionMatrix) obj;
if (!getMatrixList()
.equals(other.getMatrixList())) return false;
if (!getConceptIdsList()
.equals(other.getConceptIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getMatrixCount() > 0) {
hash = (37 * hash) + MATRIX_FIELD_NUMBER;
hash = (53 * hash) + getMatrixList().hashCode();
}
if (getConceptIdsCount() > 0) {
hash = (37 * hash) + CONCEPT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getConceptIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConfusionMatrix 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 com.clarifai.grpc.api.ConfusionMatrix parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConfusionMatrix 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 com.clarifai.grpc.api.ConfusionMatrix parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConfusionMatrix parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.clarifai.grpc.api.ConfusionMatrix prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @return A list containing the conceptIds.
*/
public com.google.protobuf.ProtocolStringList
getConceptIdsList() {
return conceptIds_.getUnmodifiableView();
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @return The count of conceptIds.
*/
public int getConceptIdsCount() {
return conceptIds_.size();
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param index The index of the element to return.
* @return The conceptIds at the given index.
*/
public java.lang.String getConceptIds(int index) {
return conceptIds_.get(index);
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param index The index of the value to return.
* @return The bytes of the conceptIds at the given index.
*/
public com.google.protobuf.ByteString
getConceptIdsBytes(int index) {
return conceptIds_.getByteString(index);
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param index The index to set the value at.
* @param value The conceptIds to set.
* @return This builder for chaining.
*/
public Builder setConceptIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptIdsIsMutable();
conceptIds_.set(index, value);
onChanged();
return this;
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param value The conceptIds to add.
* @return This builder for chaining.
*/
public Builder addConceptIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptIdsIsMutable();
conceptIds_.add(value);
onChanged();
return this;
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*
*
* repeated string concept_ids = 2;
* @param values The conceptIds to add.
* @return This builder for chaining.
*/
public Builder addAllConceptIds(
java.lang.Iterable values) {
ensureConceptIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, conceptIds_);
onChanged();
return this;
}
/**
*
* These concept_ids are ordered by the strength of the diagonal in the ConfusionMatrix.
*