public static final class OutboundMessage.FileImportRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder> implements 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 `containingUrl` be the canonical URL of the [current source file] if it has one, or undefined otherwise. * Let `response` be the result of sending a `FileImportRequest` with `string` as its `url`, `fromImport` as `from_import`, and `containingUrl` as `containing_url`. * 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`. [current source file]: ../spec.md#current-source-file [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 | Method and Description |
|---|---|
OutboundMessage.FileImportRequest |
build() |
OutboundMessage.FileImportRequest |
buildPartial() |
OutboundMessage.FileImportRequest.Builder |
clear() |
OutboundMessage.FileImportRequest.Builder |
clearContainingUrl()
The canonical URL of the [current source file] that contained the load
being resolved.
|
OutboundMessage.FileImportRequest.Builder |
clearFromImport()
Whether this request comes from an `@import` rule.
|
OutboundMessage.FileImportRequest.Builder |
clearId()
uint32 id = 1; |
OutboundMessage.FileImportRequest.Builder |
clearImporterId()
The unique ID of the importer being invoked.
|
OutboundMessage.FileImportRequest.Builder |
clearUrl()
The (non-canonicalized) URL of the import.
|
String |
getContainingUrl()
The canonical URL of the [current source file] that contained the load
being resolved.
|
com.google.protobuf.ByteString |
getContainingUrlBytes()
The canonical URL of the [current source file] that contained the load
being resolved.
|
OutboundMessage.FileImportRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getFromImport()
Whether this request comes from an `@import` rule.
|
int |
getId()
uint32 id = 1; |
int |
getImporterId()
The unique ID of the importer being invoked.
|
String |
getUrl()
The (non-canonicalized) URL of the import.
|
com.google.protobuf.ByteString |
getUrlBytes()
The (non-canonicalized) URL of the import.
|
boolean |
hasContainingUrl()
The canonical URL of the [current source file] that contained the load
being resolved.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
OutboundMessage.FileImportRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
OutboundMessage.FileImportRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
OutboundMessage.FileImportRequest.Builder |
mergeFrom(OutboundMessage.FileImportRequest other) |
OutboundMessage.FileImportRequest.Builder |
setContainingUrl(String value)
The canonical URL of the [current source file] that contained the load
being resolved.
|
OutboundMessage.FileImportRequest.Builder |
setContainingUrlBytes(com.google.protobuf.ByteString value)
The canonical URL of the [current source file] that contained the load
being resolved.
|
OutboundMessage.FileImportRequest.Builder |
setFromImport(boolean value)
Whether this request comes from an `@import` rule.
|
OutboundMessage.FileImportRequest.Builder |
setId(int value)
uint32 id = 1; |
OutboundMessage.FileImportRequest.Builder |
setImporterId(int value)
The unique ID of the importer being invoked.
|
OutboundMessage.FileImportRequest.Builder |
setUrl(String value)
The (non-canonicalized) URL of the import.
|
OutboundMessage.FileImportRequest.Builder |
setUrlBytes(com.google.protobuf.ByteString value)
The (non-canonicalized) URL of the import.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>public OutboundMessage.FileImportRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>public OutboundMessage.FileImportRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic OutboundMessage.FileImportRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic OutboundMessage.FileImportRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic OutboundMessage.FileImportRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<OutboundMessage.FileImportRequest.Builder>public OutboundMessage.FileImportRequest.Builder mergeFrom(OutboundMessage.FileImportRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>public OutboundMessage.FileImportRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<OutboundMessage.FileImportRequest.Builder>IOExceptionpublic int getId()
uint32 id = 1;getId in interface OutboundMessage.FileImportRequestOrBuilderpublic OutboundMessage.FileImportRequest.Builder setId(int value)
uint32 id = 1;value - The id to set.public OutboundMessage.FileImportRequest.Builder clearId()
uint32 id = 1;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`.
uint32 importer_id = 3;getImporterId in interface OutboundMessage.FileImportRequestOrBuilderpublic OutboundMessage.FileImportRequest.Builder setImporterId(int value)
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`.
uint32 importer_id = 3;value - The importerId to set.public OutboundMessage.FileImportRequest.Builder clearImporterId()
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`.
uint32 importer_id = 3;public String getUrl()
The (non-canonicalized) URL of the import.
string url = 4;getUrl in interface OutboundMessage.FileImportRequestOrBuilderpublic com.google.protobuf.ByteString getUrlBytes()
The (non-canonicalized) URL of the import.
string url = 4;getUrlBytes in interface OutboundMessage.FileImportRequestOrBuilderpublic OutboundMessage.FileImportRequest.Builder setUrl(String value)
The (non-canonicalized) URL of the import.
string url = 4;value - The url to set.public OutboundMessage.FileImportRequest.Builder clearUrl()
The (non-canonicalized) URL of the import.
string url = 4;public OutboundMessage.FileImportRequest.Builder setUrlBytes(com.google.protobuf.ByteString value)
The (non-canonicalized) URL of the import.
string url = 4;value - The bytes for url to set.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 OutboundMessage.FileImportRequestOrBuilderpublic OutboundMessage.FileImportRequest.Builder setFromImport(boolean value)
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;value - The fromImport to set.public OutboundMessage.FileImportRequest.Builder clearFromImport()
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;public boolean hasContainingUrl()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;hasContainingUrl in interface OutboundMessage.FileImportRequestOrBuilderpublic String getContainingUrl()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;getContainingUrl in interface OutboundMessage.FileImportRequestOrBuilderpublic com.google.protobuf.ByteString getContainingUrlBytes()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;getContainingUrlBytes in interface OutboundMessage.FileImportRequestOrBuilderpublic OutboundMessage.FileImportRequest.Builder setContainingUrl(String value)
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;value - The containingUrl to set.public OutboundMessage.FileImportRequest.Builder clearContainingUrl()
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;public OutboundMessage.FileImportRequest.Builder setContainingUrlBytes(com.google.protobuf.ByteString value)
The canonical URL of the [current source file] that contained the load being resolved. The compiler must set this unless the current source file has no canonical URL.
optional string containing_url = 6;value - The bytes for containingUrl to set.