@nebius/js-sdk - v0.2.3
    Preparing search index...

    Interface SubfieldSettings

    SubfieldSettings describes overrides for some settings for subfields of a field. Overrides are applied to fields in order of appearance, so the first matching override is applied, and the rest are ignored.

    Example:

    message MyMessage {
      string field1 = 1;
    }
    message MyMessage2 {
      MyMessage field2 = 1 [(subfield_settings) = { field_path: "field1", is_required: true }];
    }
    

    In this example, field1 in MyMessage2 is required, even if it is not required in MyMessage. The following example will override the setting again:

    service MyService {
      rpc MyMethod(MyMessage2) returns (MyMessage2) {
        option (method_behavior) = METHOD_UPDATER;
        option (request_fields) = { field_path: "field2.field1", is_required: false };
      }
    }
    

    In this example, field1 in MyMessage2 is not required for the MyMethod, even if it is required in MyMessage2.

    interface SubfieldSettings {
        "[customJson]"?: () => unknown;
        "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>;
        $type: "nebius.SubfieldSettings";
        fieldPath: string;
        isRequired?: boolean;
        nid?: NIDFieldSettings;
        [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined;
    }

    Indexable

    • [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined
    Index

    Properties

    "[customJson]"?: () => unknown
    "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>
    $type: "nebius.SubfieldSettings"
    fieldPath: string

    Subfield path in the message, for example metadata.parent_id or metadata.name. Must be a valid SelectMask. May match several fields, if necessary. For example, some.*.subfield or some.(subfield,another_field).

    isRequired?: boolean

    Mark a field as required, even if it is not required in the message it contains. Unlike cel expressions, this setting can be reflected in tools documentation and help messages.

    For fields annotated with this option, values are treated as NIDs and warnings are emitted when they are not valid. These warnings are separate from server-side validation.