public static final class EmbeddedSass.OutboundMessage.FileImportRequest extends GeneratedMessageV3 implements EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
A request for a custom filesystem importer to load the contents of a stylesheet. A filesystem importer is represented in the compiler as an [importer]. When the importer is invoked with a string `string`: [importer]: https://github.com/sass/sass/tree/main/spec/modules.md#importer * If `string` is an absolute URL whose scheme is `file`: * Let `url` be string. * Otherwise: * Let `fromImport` be `true` if the importer is being run for an `@import` and `false` otherwise. * Let `response` be the result of sending a `FileImportRequest` with `string` as its `url` and `fromImport` as `from_import`. * If `response.result` is null, return null. * Otherwise, if `response.result.error` is set, throw an error. * Otherwise, let `url` be `response.result.file_url`. * Let `resolved` be the result of [resolving `url`]. * If `resolved` is null, return null. * Let `text` be the contents of the file at `resolved`. * Let `syntax` be: * "scss" if `url` ends in `.scss`. * "indented" if `url` ends in `.sass`. * "css" if `url` ends in `.css`. > The algorithm for resolving a `file:` URL guarantees that `url` will have > one of these extensions. * Return `text`, `syntax`, and `resolved`. [resolving `url`]: https://github.com/sass/sass/tree/main/spec/modules.md#resolving-a-file-urlProtobuf type
sass.embedded_protocol.OutboundMessage.FileImportRequest
Modifier and Type | Class and Description |
---|---|
static class |
EmbeddedSass.OutboundMessage.FileImportRequest.Builder
A request for a custom filesystem importer to load the contents of a
stylesheet.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
COMPILATION_ID_FIELD_NUMBER |
static int |
FROM_IMPORT_FIELD_NUMBER |
static int |
ID_FIELD_NUMBER |
static int |
IMPORTER_ID_FIELD_NUMBER |
static int |
URL_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int ID_FIELD_NUMBER
public static final int COMPILATION_ID_FIELD_NUMBER
public static final int IMPORTER_ID_FIELD_NUMBER
public static final int URL_FIELD_NUMBER
public static final int FROM_IMPORT_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public int getId()
uint32 id = 1;
getId
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public int getCompilationId()
The request id for the compilation that triggered the message. Mandatory.
uint32 compilation_id = 2;
getCompilationId
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public int getImporterId()
The unique ID of the importer being invoked. This must match an `Importer.file_importer_id` passed to this compilation in `CompileRequest.importers` or `CompileRequest.input.string.importer`. Mandatory.
uint32 importer_id = 3;
getImporterId
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public String getUrl()
The (non-canonicalized) URL of the import.
string url = 4;
getUrl
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public ByteString getUrlBytes()
The (non-canonicalized) URL of the import.
string url = 4;
getUrlBytes
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public boolean getFromImport()
/ Whether this request comes from an `@import` rule. / / When evaluating `@import` rules, filesystem importers should load an / [import-only file] if one exists for the URL being canonicalized. / Otherwise, canonicalization should be identical for `@import` and `@use` / rules. / / [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
bool from_import = 5;
getFromImport
in interface EmbeddedSass.OutboundMessage.FileImportRequestOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(InputStream input) throws IOException
IOException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static EmbeddedSass.OutboundMessage.FileImportRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public EmbeddedSass.OutboundMessage.FileImportRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static EmbeddedSass.OutboundMessage.FileImportRequest.Builder newBuilder()
public static EmbeddedSass.OutboundMessage.FileImportRequest.Builder newBuilder(EmbeddedSass.OutboundMessage.FileImportRequest prototype)
public EmbeddedSass.OutboundMessage.FileImportRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected EmbeddedSass.OutboundMessage.FileImportRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static EmbeddedSass.OutboundMessage.FileImportRequest getDefaultInstance()
public static Parser<EmbeddedSass.OutboundMessage.FileImportRequest> parser()
public Parser<EmbeddedSass.OutboundMessage.FileImportRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public EmbeddedSass.OutboundMessage.FileImportRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder