package models

import "encoding/json"

type DesireAppRequestFromCC struct {
	AppId           string                `json:"app_id"`
	AppVersion      string                `json:"app_version"`
	DropletUri      string                `json:"droplet_uri"`
	Stack           string                `json:"stack"`
	StartCommand    string                `json:"start_command"`
	Environment     []EnvironmentVariable `json:"environment"`
	MemoryMB        int                   `json:"memory_mb"`
	DiskMB          int                   `json:"disk_mb"`
	FileDescriptors uint64                `json:"file_descriptors"`
	NumInstances    int                   `json:"num_instances"`
	Routes          []string              `json:"routes"`
}

func (d DesireAppRequestFromCC) ToJSON() []byte {
	encoded, _ := json.Marshal(d)
	return encoded
}

package models

import "encoding/json"

type DesireAppRequestFromCC struct {
	ProcessGuid     string                `json:"process_guid"`
	DropletUri      string                `json:"droplet_uri"`
	Stack           string                `json:"stack"`
	StartCommand    string                `json:"start_command"`
	Environment     []EnvironmentVariable `json:"environment"`
	MemoryMB        int                   `json:"memory_mb"`
	DiskMB          int                   `json:"disk_mb"`
	FileDescriptors uint64                `json:"file_descriptors"`
	NumInstances    int                   `json:"num_instances"`
	Routes          []string              `json:"routes"`
	LogGuid         string                `json:"log_guid"`
}

func (d DesireAppRequestFromCC) ToJSON() []byte {
	encoded, _ := json.Marshal(d)
	return encoded
}

Change NATS desire app message format.
Change NATS desire app message format.

Signed-off-by: Momchil Atanasov <32dfc64aa82b4a16510185529922b8f0a0c3fedb@gmail.com>
