syntax = "proto3";

package com.wix.ecommerce.catalog_spi.api.v1;

import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";


message DescriptionLine {
    enum DescriptionLineType {
        // Unrecognized type.
        UNRECOGNISED = 0;
        // Plain text type.
        PLAIN_TEXT = 1;
        // Color type.
        COLOR = 2;
    }

    // Description line name.
    DescriptionLineName name = 1;


    oneof value {

        // Description line plain text value.
        PlainTextValue plain_text = 5;
        // Description line color value.
        Color color_info = 6;
    }

    // Description line type.
    DescriptionLineType line_type = 2 [deprecated = true, (.wix.api.field_exposure) = PRIVATE];

    // __Deprecated.__ Use `value` instead.
    oneof descriptionLineValue {
        
        // Description line plain text value.
        PlainTextValue plain_text_value = 3 [deprecated = true, (.wix.api.field_exposure) = PRIVATE];
        
        // Description line color.
        string color = 4 [deprecated = true, (.wix.api.field_exposure) = PRIVATE];
    }

    // Whether the description line originates from a modifier.
    bool modifier_description_line = 7 [(.wix.api.field_maturity) = ALPHA];
}

message DescriptionLineName {
    
    // Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
    string original = 1 [(.wix.api.maxLength) = 100];
    
    // Description line name translated into the buyer's language.
    //
    // Default: Same as `original`.
    google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 200];
}

message PlainTextValue {
    
    // Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
    string original = 1 [(.wix.api.maxLength) = 600];
    
    // Description line plain text value translated into the buyer's language.
    //
    // Default: Same as `original`.
    google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 600];
}

message Color {
    
    // Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
    string original = 1 [(.wix.api.maxLength) = 500];
    
    // Description line color name translated into the buyer's language.
    //
    // Default: Same as `original`.
    google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 500];
    
    // HEX or RGB color code for display.
    google.protobuf.StringValue code = 3;
}