syntax = "proto3";

package yandex.cloud.mdb.mysql.v1alpha.config;

import "google/protobuf/wrappers.proto";
import "yandex/cloud/validation.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mysql/v1alpha/config;mysql";
option java_package = "yandex.cloud.api.mdb.mysql.v1alpha.config";

// Options and structure of `MysqlConfig5_7` reflects MySQL 5.7 configuration file
message MysqlConfig5_7 {
  // Size of the InnoDB buffer pool used for caching table and index data.
  //
  // For details, see [MySQL documentation for the parameter](https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size).
  google.protobuf.Int64Value innodb_buffer_pool_size = 1 [(value) = ">=5242880"];

  // The maximum permitted number of simultaneous client connections.
  //
  // For details, see [MySQL documentation for the variable](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections).
  google.protobuf.Int64Value max_connections = 2 [(value) = "10-10000"];

  // Time that it takes to process a query before it is considered slow.
  //
  // For details, see [MySQL documentation for the variable](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_long_query_time).
  google.protobuf.DoubleValue long_query_time = 3;

}

message MysqlConfigSet5_7 {
  // Effective settings for a MySQL 5.7 cluster (a combination of settings defined
  // in [user_config] and [default_config]).
  MysqlConfig5_7 effective_config = 1;

  // User-defined settings for a MySQL 5.7 cluster.
  MysqlConfig5_7 user_config = 2;

  // Default configuration for a MySQL 5.7 cluster.
  MysqlConfig5_7 default_config = 3;
}
