org.jclouds.joyent.cloudapi.v6_5.domain
Class Machine

java.lang.Object
  extended by org.jclouds.joyent.cloudapi.v6_5.domain.Machine
All Implemented Interfaces:
Comparable<Machine>

public class Machine
extends Object
implements Comparable<Machine>

Listing of a machine.

Author:
Gerald Pereira
See Also:

Nested Class Summary
static class Machine.Builder
           
static class Machine.State
           
 
Field Summary
protected  Date created
           
protected  String dataset
           
protected  int diskSizeGb
           
protected  String id
           
protected  Set<String> ips
           
protected  int memorySizeMb
           
protected  String name
           
protected  Machine.State state
           
protected  Type type
           
protected  Date updated
           
 
Constructor Summary
Machine(String id, String name, Type type, Machine.State state, String dataset, int memorySizeMb, int diskSizeGb, Set<String> ips, Date created, Date updated, Map<String,JsonBall> metadata)
           
 
Method Summary
static Machine.Builder builder()
           
 int compareTo(Machine other)
           
 boolean equals(Object object)
           
 String get()
           
 Date getCreated()
           
 int getDiskSizeGb()
           
 String getId()
           
 Set<String> getIps()
           
 int getMemorySizeMb()
           
 Map<String,String> getMetadata()
          Note!! metadata can contain arbitrarily complex values.
 Map<String,String> getMetadataAsJsonLiterals()
          If the value is a string, it will be quoted, as that's how json strings are represented.
 String getName()
           
 Machine.State getState()
           
 Type getType()
           
 Date getUpdated()
           
 int hashCode()
           
 Machine.Builder toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected final String id

name

protected final String name

type

protected final Type type

state

protected final Machine.State state

dataset

protected final String dataset

memorySizeMb

protected final int memorySizeMb

diskSizeGb

protected final int diskSizeGb

ips

protected final Set<String> ips

created

protected final Date created

updated

protected final Date updated
Constructor Detail

Machine

public Machine(String id,
               String name,
               Type type,
               Machine.State state,
               String dataset,
               int memorySizeMb,
               int diskSizeGb,
               Set<String> ips,
               Date created,
               Date updated,
               Map<String,JsonBall> metadata)
Method Detail

builder

public static Machine.Builder builder()

toBuilder

public Machine.Builder toBuilder()

compareTo

public int compareTo(Machine other)
Specified by:
compareTo in interface Comparable<Machine>

getId

public String getId()

getName

public String getName()

getType

public Type getType()

getState

public Machine.State getState()

get

public String get()

getMemorySizeMb

public int getMemorySizeMb()

getDiskSizeGb

public int getDiskSizeGb()

getIps

public Set<String> getIps()

getCreated

public Date getCreated()

getUpdated

public Date getUpdated()

getMetadataAsJsonLiterals

public Map<String,String> getMetadataAsJsonLiterals()
If the value is a string, it will be quoted, as that's how json strings are represented.

Returns:
key to a json literal of the value
See Also:
Metadata.valueType, Json.fromJson(java.lang.String, java.lang.reflect.Type)

getMetadata

public Map<String,String> getMetadata()
Note!! metadata can contain arbitrarily complex values. If the value has structure, you should use getMetadataAsJsonLiterals()

Returns:
metadata

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 jclouds. All Rights Reserved.