Module org.elasticsearch.server
Package org.elasticsearch.ingest
Record Class SamplingService.RawDocument
java.lang.Object
java.lang.Record
org.elasticsearch.ingest.SamplingService.RawDocument
- All Implemented Interfaces:
Writeable
- Enclosing class:
SamplingService
public static record SamplingService.RawDocument(ProjectId projectId, String indexName, byte[] source, XContentType contentType)
extends Record
implements Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionRawDocument(ProjectId projectId, String indexName, byte[] source, XContentType contentType) Creates an instance of aRawDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theindexNamerecord component.Returns the value of theprojectIdrecord component.byte[]source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
RawDocument
- Throws:
IOException
-
RawDocument
Creates an instance of aRawDocumentrecord class.- Parameters:
projectId- the value for theprojectIdrecord componentindexName- the value for theindexNamerecord componentsource- the value for thesourcerecord componentcontentType- the value for thecontentTyperecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
indexName
Returns the value of theindexNamerecord component.- Returns:
- the value of the
indexNamerecord component
-
source
public byte[] source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-