syntax = "proto3";

package com.wixpress.appservice.api.pricing;

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

option java_package = "com.wixpress.appservice.api.pricing";

message Feature {
    google.protobuf.StringValue id = 1;
    google.protobuf.StringValue name = 2;
    google.protobuf.StringValue description = 3;
    FeatureSection section = 4;
}

message FeatureSection {
    google.protobuf.StringValue intent = 1;
    google.protobuf.StringValue displayName = 2;
}

message CreateFeatureRequest {
    string app_id = 1 [(wix.api.format) = GUID];
    string language_code = 2; // todo: add format LANGUAGE when client is ready
    Feature feature = 3;
}

message CreateFeatureResponse {
    string id = 1;
    Feature feature = 2;
}

message UpdateFeatureRequest {
    string app_id = 1 [(wix.api.format) = GUID];
    string language_code = 2; // todo: add format LANGUAGE when client is ready
    string feature_id = 3 [(wix.api.format) = GUID];
    Feature feature = 4;
}

message UpdateFeatureResponse {
    Feature feature = 1;
}

message GetFeatureRequest {
    string app_id = 1 [(wix.api.format) = GUID];
    string language_code = 2; // todo: add format LANGUAGE when client is ready
    string feature_id = 3 [(wix.api.format) = GUID];
}

message GetFeatureResponse {
    Feature feature = 1;
}

message DeleteFeatureRequest {
    string app_id = 1 [(wix.api.format) = GUID];
    string language_code = 2; // todo: add format LANGUAGE when client is ready
    string feature_id = 3 [(wix.api.format) = GUID];
}

message DeleteFeatureResponse {
    string feature_id = 1;
}

message UpdateFeatureTranslationWithRequest {
    map<string, string> translation_data = 1;
    string app_id = 2 [(wix.api.format) = GUID];
    string feature_id = 3 [(wix.api.format) = GUID];
    string language_code = 4 [(wix.api.format) = LANGUAGE];
}

message UpdateFeatureTranslationWithResponse {

}