package somaproto

type ProtoRequestServer struct {
	Server ProtoServer       `json:"server,omitempty"`
	Filter ProtoServerFilter `json:"filter,omitempty"`
	Purge  bool              `json:"purge,omitempty"`
}

type ProtoResultServer struct {
	Code    uint16        `json:"code,omitempty"`
	Status  string        `json:"status,omitempty"`
	Text    []string      `json:"text,omitempty"`
	Servers []ProtoServer `json:"servers,omitempty"`
}

type ProtoServer struct {
	AssetId    uint64              `json:"assetid,omitempty"`
	Datacenter string              `json:"datacenter,omitempty"`
	Location   string              `json:"location,omitempty"`
	Name       string              `json:"name,omitempty"`
	Online     bool                `json:"online,omitempty"`
	Details    *ProtoServerDetails `json:"details,omitempty"`
}

type ProtoServerDetails struct {
	CreatedAt string   `json:"createdat,omitempty"`
	CreatedBy string   `json:"createdby,omitempty"`
	Nodes     []string `json:"nodes,omitempty"`
}

type ProtoServerFilter struct {
	Online     bool   `json:"online,omitempty"`
	Deleted    bool   `json:"deleted,omitempty"`
	Datacenter string `json:"datacenter,omitempty"`
	Name       string `json:"name,omitempty"`
}

// vim: ts=4 sw=4 sts=4 noet fenc=utf-8 ffs=unix

package somaproto

import "github.com/satori/go.uuid"

type ProtoRequestServer struct {
	Server ProtoServer       `json:"server,omitempty"`
	Filter ProtoServerFilter `json:"filter,omitempty"`
	Purge  bool              `json:"purge,omitempty"`
}

type ProtoResultServer struct {
	Code    uint16        `json:"code,omitempty"`
	Status  string        `json:"status,omitempty"`
	Text    []string      `json:"text,omitempty"`
	Servers []ProtoServer `json:"servers,omitempty"`
}

type ProtoServer struct {
	Id         uuid.UUID           `json:"id,omitempty"`
	AssetId    uint64              `json:"assetid,omitempty"`
	Datacenter string              `json:"datacenter,omitempty"`
	Location   string              `json:"location,omitempty"`
	Name       string              `json:"name,omitempty"`
	Online     bool                `json:"online,omitempty"`
	Details    *ProtoServerDetails `json:"details,omitempty"`
}

type ProtoServerDetails struct {
	CreatedAt string   `json:"createdat,omitempty"`
	CreatedBy string   `json:"createdby,omitempty"`
	Nodes     []string `json:"nodes,omitempty"`
}

type ProtoServerFilter struct {
	Online     bool   `json:"online,omitempty"`
	Deleted    bool   `json:"deleted,omitempty"`
	Datacenter string `json:"datacenter,omitempty"`
	Name       string `json:"name,omitempty"`
}

// vim: ts=4 sw=4 sts=4 noet fenc=utf-8 ffs=unix

Add Id field to ProtoServer
Add Id field to ProtoServer

Keep it at uuid.UUID for now. Conversion to string will happen
together with soma and somaadm server implementation/fixes.
