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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public 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.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessage.Builder<OutboundMessage.FileImportRequest.Builder>
public OutboundMessage.FileImportRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public OutboundMessage.FileImportRequest build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public OutboundMessage.FileImportRequest buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public OutboundMessage.FileImportRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
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.MessageLiteOrBuilder
isInitialized
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.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<OutboundMessage.FileImportRequest.Builder>
IOException
public int getId()
uint32 id = 1;
getId
in interface OutboundMessage.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public com.google.protobuf.ByteString getUrlBytes()
The (non-canonicalized) URL of the import.
string url = 4;
getUrlBytes
in interface OutboundMessage.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public 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.FileImportRequestOrBuilder
public 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.