Package io.cucumber.messages
Class Messages.Attachment
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.cucumber.messages.Messages.Attachment
-
- All Implemented Interfaces:
com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Messages.AttachmentOrBuilder
,Serializable
- Enclosing class:
- Messages
public static final class Messages.Attachment extends com.google.protobuf.GeneratedMessageV3 implements Messages.AttachmentOrBuilder
An attachment represents any kind of data associated with a line in a [Source](#io.cucumber.messages.Source) file. It can be used for: * Syntax errors during parse time * Screenshots captured and attached during execution * Logs captured and attached during execution It is not to be used for runtime errors raised/thrown during execution. This is captured in `TestResult`.
Protobuf typeio.cucumber.messages.Attachment
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Messages.Attachment.Builder
An attachment represents any kind of data associated with a line in a [Source](#io.cucumber.messages.Source) file.static class
Messages.Attachment.ContentEncoding
Protobuf enumio.cucumber.messages.Attachment.ContentEncoding
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
BODY_FIELD_NUMBER
static int
CONTENT_ENCODING_FIELD_NUMBER
static int
FILE_NAME_FIELD_NUMBER
static int
MEDIA_TYPE_FIELD_NUMBER
static int
SOURCE_FIELD_NUMBER
static int
TEST_CASE_STARTED_ID_FIELD_NUMBER
static int
TEST_STEP_ID_FIELD_NUMBER
static int
URL_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getBody()
The body of the attachment.com.google.protobuf.ByteString
getBodyBytes()
The body of the attachment.Messages.Attachment.ContentEncoding
getContentEncoding()
Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64).int
getContentEncodingValue()
Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64).static Messages.Attachment
getDefaultInstance()
Messages.Attachment
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getFileName()
Suggested file name of the attachment.com.google.protobuf.ByteString
getFileNameBytes()
Suggested file name of the attachment.String
getMediaType()
The media type of the data.com.google.protobuf.ByteString
getMediaTypeBytes()
The media type of the data.com.google.protobuf.Parser<Messages.Attachment>
getParserForType()
int
getSerializedSize()
Messages.SourceReference
getSource()
.io.cucumber.messages.SourceReference source = 1;
Messages.SourceReferenceOrBuilder
getSourceOrBuilder()
.io.cucumber.messages.SourceReference source = 1;
String
getTestCaseStartedId()
string test_case_started_id = 3;
com.google.protobuf.ByteString
getTestCaseStartedIdBytes()
string test_case_started_id = 3;
String
getTestStepId()
string test_step_id = 2;
com.google.protobuf.ByteString
getTestStepIdBytes()
string test_step_id = 2;
com.google.protobuf.UnknownFieldSet
getUnknownFields()
String
getUrl()
A URL where the attachment can be retrieved.com.google.protobuf.ByteString
getUrlBytes()
A URL where the attachment can be retrieved.int
hashCode()
boolean
hasSource()
.io.cucumber.messages.SourceReference source = 1;
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Messages.Attachment.Builder
newBuilder()
static Messages.Attachment.Builder
newBuilder(Messages.Attachment prototype)
Messages.Attachment.Builder
newBuilderForType()
protected Messages.Attachment.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
static Messages.Attachment
parseDelimitedFrom(InputStream input)
static Messages.Attachment
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Messages.Attachment
parseFrom(byte[] data)
static Messages.Attachment
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Messages.Attachment
parseFrom(com.google.protobuf.ByteString data)
static Messages.Attachment
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Messages.Attachment
parseFrom(com.google.protobuf.CodedInputStream input)
static Messages.Attachment
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Messages.Attachment
parseFrom(InputStream input)
static Messages.Attachment
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Messages.Attachment
parseFrom(ByteBuffer data)
static Messages.Attachment
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Messages.Attachment>
parser()
Messages.Attachment.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newInstance, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TEST_STEP_ID_FIELD_NUMBER
public static final int TEST_STEP_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TEST_CASE_STARTED_ID_FIELD_NUMBER
public static final int TEST_CASE_STARTED_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BODY_FIELD_NUMBER
public static final int BODY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MEDIA_TYPE_FIELD_NUMBER
public static final int MEDIA_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONTENT_ENCODING_FIELD_NUMBER
public static final int CONTENT_ENCODING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FILE_NAME_FIELD_NUMBER
public static final int FILE_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
URL_FIELD_NUMBER
public static final int URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
hasSource
public boolean hasSource()
.io.cucumber.messages.SourceReference source = 1;
- Specified by:
hasSource
in interfaceMessages.AttachmentOrBuilder
-
getSource
public Messages.SourceReference getSource()
.io.cucumber.messages.SourceReference source = 1;
- Specified by:
getSource
in interfaceMessages.AttachmentOrBuilder
-
getSourceOrBuilder
public Messages.SourceReferenceOrBuilder getSourceOrBuilder()
.io.cucumber.messages.SourceReference source = 1;
- Specified by:
getSourceOrBuilder
in interfaceMessages.AttachmentOrBuilder
-
getTestStepId
public String getTestStepId()
string test_step_id = 2;
- Specified by:
getTestStepId
in interfaceMessages.AttachmentOrBuilder
-
getTestStepIdBytes
public com.google.protobuf.ByteString getTestStepIdBytes()
string test_step_id = 2;
- Specified by:
getTestStepIdBytes
in interfaceMessages.AttachmentOrBuilder
-
getTestCaseStartedId
public String getTestCaseStartedId()
string test_case_started_id = 3;
- Specified by:
getTestCaseStartedId
in interfaceMessages.AttachmentOrBuilder
-
getTestCaseStartedIdBytes
public com.google.protobuf.ByteString getTestCaseStartedIdBytes()
string test_case_started_id = 3;
- Specified by:
getTestCaseStartedIdBytes
in interfaceMessages.AttachmentOrBuilder
-
getBody
public String getBody()
The body of the attachment. If `content_encoding` is `IDENTITY`, the attachment is simply the string. If it's `BASE64`, the string should be Base64 decoded to obtain the attachment.
string body = 4;
- Specified by:
getBody
in interfaceMessages.AttachmentOrBuilder
-
getBodyBytes
public com.google.protobuf.ByteString getBodyBytes()
The body of the attachment. If `content_encoding` is `IDENTITY`, the attachment is simply the string. If it's `BASE64`, the string should be Base64 decoded to obtain the attachment.
string body = 4;
- Specified by:
getBodyBytes
in interfaceMessages.AttachmentOrBuilder
-
getMediaType
public String getMediaType()
The media type of the data. This can be any valid [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain` and `text/x.cucumber.stacktrace+plain`
string media_type = 5;
- Specified by:
getMediaType
in interfaceMessages.AttachmentOrBuilder
-
getMediaTypeBytes
public com.google.protobuf.ByteString getMediaTypeBytes()
The media type of the data. This can be any valid [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain` and `text/x.cucumber.stacktrace+plain`
string media_type = 5;
- Specified by:
getMediaTypeBytes
in interfaceMessages.AttachmentOrBuilder
-
getContentEncodingValue
public int getContentEncodingValue()
Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64). Content encoding is *not* determined by the media type, but rather by the type of the object being attached: - string => IDENTITY - byte array => BASE64 - stream => BASE64
.io.cucumber.messages.Attachment.ContentEncoding content_encoding = 6;
- Specified by:
getContentEncodingValue
in interfaceMessages.AttachmentOrBuilder
-
getContentEncoding
public Messages.Attachment.ContentEncoding getContentEncoding()
Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64). Content encoding is *not* determined by the media type, but rather by the type of the object being attached: - string => IDENTITY - byte array => BASE64 - stream => BASE64
.io.cucumber.messages.Attachment.ContentEncoding content_encoding = 6;
- Specified by:
getContentEncoding
in interfaceMessages.AttachmentOrBuilder
-
getFileName
public String getFileName()
Suggested file name of the attachment. (Provided by the user as an argument to `attach`)
string file_name = 7;
- Specified by:
getFileName
in interfaceMessages.AttachmentOrBuilder
-
getFileNameBytes
public com.google.protobuf.ByteString getFileNameBytes()
Suggested file name of the attachment. (Provided by the user as an argument to `attach`)
string file_name = 7;
- Specified by:
getFileNameBytes
in interfaceMessages.AttachmentOrBuilder
-
getUrl
public String getUrl()
A URL where the attachment can be retrieved. This field should not be set by Cucumber. It should be set by a program that reads a message stream and does the following for each Attachment message: - Writes the body (after base64 decoding if necessary) to a new file. - Sets `body` and `content_encoding` to `null` - Writes out the new attachment message This will result in a smaller message stream, which can improve performance and reduce bandwidth of message consumers. It also makes it easier to process and download attachments separately from reports.
string url = 8;
- Specified by:
getUrl
in interfaceMessages.AttachmentOrBuilder
-
getUrlBytes
public com.google.protobuf.ByteString getUrlBytes()
A URL where the attachment can be retrieved. This field should not be set by Cucumber. It should be set by a program that reads a message stream and does the following for each Attachment message: - Writes the body (after base64 decoding if necessary) to a new file. - Sets `body` and `content_encoding` to `null` - Writes out the new attachment message This will result in a smaller message stream, which can improve performance and reduce bandwidth of message consumers. It also makes it easier to process and download attachments separately from reports.
string url = 8;
- Specified by:
getUrlBytes
in interfaceMessages.AttachmentOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Messages.Attachment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Messages.Attachment parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Messages.Attachment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Messages.Attachment parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Messages.Attachment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Messages.Attachment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Messages.Attachment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Messages.Attachment.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Messages.Attachment.Builder newBuilder()
-
newBuilder
public static Messages.Attachment.Builder newBuilder(Messages.Attachment prototype)
-
toBuilder
public Messages.Attachment.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Messages.Attachment.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Messages.Attachment getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Messages.Attachment> parser()
-
getParserForType
public com.google.protobuf.Parser<Messages.Attachment> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Messages.Attachment getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-