Table of Contents

Class ClassificationInput

Namespace
Resolver.Athena.Grpc
Assembly
Resolver.Athena.Grpc.Models.dll

A single image within a classification request batch. Contains all necessary metadata and data for classifying one image.

public sealed class ClassificationInput : IMessage<ClassificationInput>, IEquatable<ClassificationInput>, IDeepCloneable<ClassificationInput>, IBufferMessage, IMessage
Inheritance
ClassificationInput
Implements
IDeepCloneable<ClassificationInput>
IBufferMessage
IMessage
Inherited Members

Constructors

ClassificationInput()

public ClassificationInput()

ClassificationInput(ClassificationInput)

public ClassificationInput(ClassificationInput other)

Parameters

other ClassificationInput

Fields

AffiliateFieldNumber

Field number for the "affiliate" field.

public const int AffiliateFieldNumber = 1

Field Value

int

CorrelationIdFieldNumber

Field number for the "correlation_id" field.

public const int CorrelationIdFieldNumber = 2

Field Value

int

DataFieldNumber

Field number for the "data" field.

public const int DataFieldNumber = 4

Field Value

int

EncodingFieldNumber

Field number for the "encoding" field.

public const int EncodingFieldNumber = 3

Field Value

int

FormatFieldNumber

Field number for the "format" field.

public const int FormatFieldNumber = 5

Field Value

int

HashesFieldNumber

Field number for the "hashes" field.

public const int HashesFieldNumber = 6

Field Value

int

Properties

Affiliate

The affiliate or source system that provided this image Used for tracking, analytics, and routing purposes.

public string Affiliate { get; set; }

Property Value

string

CorrelationId

Unique identifier for correlating this input with its response Must be unique within the deployment to properly match responses

public string CorrelationId { get; set; }

Property Value

string

Data

The raw image data bytes in the format specified by encoding Can be compressed or uncompressed based on the encoding field

public ByteString Data { get; set; }

Property Value

ByteString

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

Encoding

Specifies the encoding/compression format of the image data Allows the server to properly decode the image before classification

public RequestEncoding Encoding { get; set; }

Property Value

RequestEncoding

Format

The image file format of the data bytes

public ImageFormat Format { get; set; }

Property Value

ImageFormat

Hashes

Hashes of the image data, can be multiple depending on image processing (e.g. of raw bytes, jpeg image, etc.) but must be for a single image.

public RepeatedField<ImageHash> Hashes { get; }

Property Value

RepeatedField<ImageHash>

Parser

public static MessageParser<ClassificationInput> Parser { get; }

Property Value

MessageParser<ClassificationInput>

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public ClassificationInput Clone()

Returns

ClassificationInput

A deep clone of this object.

Equals(ClassificationInput)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ClassificationInput other)

Parameters

other ClassificationInput

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(ClassificationInput)

Merges the given message into this one.

public void MergeFrom(ClassificationInput other)

Parameters

other ClassificationInput

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.