org.jclouds.googlecomputeengine.domain
Class Resource
java.lang.Object
org.jclouds.googlecomputeengine.domain.Resource
- Direct Known Subclasses:
- AbstractDisk, Address, Firewall, Image, Instance, MachineType, Network, Operation, Project, Region, Route, Zone
@Beta
public class Resource
- extends Object
Base class for Google Compute Engine resources.
kind
protected final Resource.Kind kind
id
protected final String id
creationTimestamp
protected final com.google.common.base.Optional<Date> creationTimestamp
selfLink
protected final URI selfLink
name
protected final String name
description
protected final com.google.common.base.Optional<String> description
Resource
@ConstructorProperties(value={"kind","id","creationTimestamp","selfLink","name","description"})
protected Resource(Resource.Kind kind,
String id,
Date creationTimestamp,
URI selfLink,
String name,
String description)
getKind
public Resource.Kind getKind()
- Returns:
- the Type of the resource
getId
public String getId()
- Returns:
- unique identifier for the resource; defined by the server.
getCreationTimestamp
public com.google.common.base.Optional<Date> getCreationTimestamp()
- Returns:
- creation timestamp in RFC3339 text format.
getSelfLink
public URI getSelfLink()
- Returns:
- server defined URL for the resource.
getName
public String getName()
- Returns:
- name of the resource.
getDescription
@Nullable
public com.google.common.base.Optional<String> getDescription()
- Returns:
- an optional textual description of the resource.
hashCode
public int hashCode()
-
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
-
- Overrides:
equals in class Object
string
protected com.google.common.base.Objects.ToStringHelper string()
-
toString
public String toString()
-
- Overrides:
toString in class Object
builder
public static Resource.Builder<?> builder()
toBuilder
public Resource.Builder<?> toBuilder()
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.