(************************************************)
(*       AUTOGENERATED FILE - DO NOT EDIT!      *)
(************************************************)
(* Generated by: ocaml-protoc-plugin            *)
(* https://github.com/issuu/ocaml-protoc-plugin *)
(************************************************)
(*
  Source: etcd/api/versionpb/version.proto
  Syntax: proto3
  Parameters:
    debug=false
    annot='[@@deriving show { with_path = false}]'
    opens=[Stubs; Google_types]
    int64_as_int=true
    int32_as_int=true
    fixed_as_int=false
    singleton_record=false
*)

open Ocaml_protoc_plugin.Runtime [@@warning "-33"]
open Stubs [@@warning "-33"]
open Google_types [@@warning "-33"]

(**/**)

module Imported'modules = struct
  module Gogo = Gogo
  module Descriptor = Descriptor
end

(**/**)

module Versionpb = struct
  module rec Etcd_version_msg : sig
    type t = string option [@@deriving show { with_path = false }]

    val get :
      Imported'modules.Descriptor.Google.Protobuf.MessageOptions.t ->
      (string option, [> Runtime'.Result.error ]) result

    val set :
      Imported'modules.Descriptor.Google.Protobuf.MessageOptions.t ->
      string option ->
      Imported'modules.Descriptor.Google.Protobuf.MessageOptions.t
  end = struct
    type t = string option [@@deriving show { with_path = false }]

    let get extendee =
      Runtime'.Extensions.get
        Runtime'.Deserialize.C.(basic_opt (50000, string) ^:: nil)
        extendee
          .Imported'modules.Descriptor.Google.Protobuf.MessageOptions
           .extensions'
      |> Runtime'.Result.open_error

    let set extendee t =
      let extensions' =
        Runtime'.Extensions.set
          Runtime'.Serialize.C.(basic_opt (50000, string) ^:: nil)
          extendee
            .Imported'modules.Descriptor.Google.Protobuf.MessageOptions
             .extensions' t
      in
      {
        extendee with
        Imported'modules.Descriptor.Google.Protobuf.MessageOptions.extensions';
      }
  end

  and Etcd_version_field : sig
    type t = string option [@@deriving show { with_path = false }]

    val get :
      Imported'modules.Descriptor.Google.Protobuf.FieldOptions.t ->
      (string option, [> Runtime'.Result.error ]) result

    val set :
      Imported'modules.Descriptor.Google.Protobuf.FieldOptions.t ->
      string option ->
      Imported'modules.Descriptor.Google.Protobuf.FieldOptions.t
  end = struct
    type t = string option [@@deriving show { with_path = false }]

    let get extendee =
      Runtime'.Extensions.get
        Runtime'.Deserialize.C.(basic_opt (50001, string) ^:: nil)
        extendee
          .Imported'modules.Descriptor.Google.Protobuf.FieldOptions.extensions'
      |> Runtime'.Result.open_error

    let set extendee t =
      let extensions' =
        Runtime'.Extensions.set
          Runtime'.Serialize.C.(basic_opt (50001, string) ^:: nil)
          extendee
            .Imported'modules.Descriptor.Google.Protobuf.FieldOptions
             .extensions' t
      in
      {
        extendee with
        Imported'modules.Descriptor.Google.Protobuf.FieldOptions.extensions';
      }
  end

  and Etcd_version_enum : sig
    type t = string option [@@deriving show { with_path = false }]

    val get :
      Imported'modules.Descriptor.Google.Protobuf.EnumOptions.t ->
      (string option, [> Runtime'.Result.error ]) result

    val set :
      Imported'modules.Descriptor.Google.Protobuf.EnumOptions.t ->
      string option ->
      Imported'modules.Descriptor.Google.Protobuf.EnumOptions.t
  end = struct
    type t = string option [@@deriving show { with_path = false }]

    let get extendee =
      Runtime'.Extensions.get
        Runtime'.Deserialize.C.(basic_opt (50002, string) ^:: nil)
        extendee
          .Imported'modules.Descriptor.Google.Protobuf.EnumOptions.extensions'
      |> Runtime'.Result.open_error

    let set extendee t =
      let extensions' =
        Runtime'.Extensions.set
          Runtime'.Serialize.C.(basic_opt (50002, string) ^:: nil)
          extendee
            .Imported'modules.Descriptor.Google.Protobuf.EnumOptions.extensions'
          t
      in
      {
        extendee with
        Imported'modules.Descriptor.Google.Protobuf.EnumOptions.extensions';
      }
  end

  and Etcd_version_enum_value : sig
    type t = string option [@@deriving show { with_path = false }]

    val get :
      Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions.t ->
      (string option, [> Runtime'.Result.error ]) result

    val set :
      Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions.t ->
      string option ->
      Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions.t
  end = struct
    type t = string option [@@deriving show { with_path = false }]

    let get extendee =
      Runtime'.Extensions.get
        Runtime'.Deserialize.C.(basic_opt (50003, string) ^:: nil)
        extendee
          .Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions
           .extensions'
      |> Runtime'.Result.open_error

    let set extendee t =
      let extensions' =
        Runtime'.Extensions.set
          Runtime'.Serialize.C.(basic_opt (50003, string) ^:: nil)
          extendee
            .Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions
             .extensions' t
      in
      {
        extendee with
        Imported'modules.Descriptor.Google.Protobuf.EnumValueOptions.extensions';
      }
  end
end
