JCLOUDS-1225: Address Guava 18 Objects changes

Fixed with:

find -name \*.java | xargs sed -i 's/Objects.[Tt]oStringHelper/More&/g'
find -name \*.java | xargs sed -i 's/Objects.firstNonNull/More&/g'
find -name \*.java | xargs sed -i 's/^\(import com.google.common.base.\)\(Objects.*\)/\1More\2\n\1\2/g'
find -name \*.java | xargs java -jar google-java-format-1.3-all-deps.jar -i --fix-imports-only --skip-sorting-imports
This commit is contained in:
Andrew Gaul
2017-08-21 13:35:48 -07:00
parent e331a000d1
commit a493e2ca2f
410 changed files with 953 additions and 667 deletions
@@ -88,7 +88,7 @@ import org.jclouds.rest.AuthorizationException;
import org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.cache.CacheBuilder;
@@ -177,7 +177,7 @@ public class CloudStackComputeServiceContextModule extends
}
@Override
public String toString() {
return Objects.toStringHelper(client.getGuestOSApi()).add("method", "listOSCategories").toString();
return MoreObjects.toStringHelper(client.getGuestOSApi()).add("method", "listOSCategories").toString();
}
}, seconds, TimeUnit.SECONDS);
}
@@ -202,7 +202,7 @@ public class CloudStackComputeServiceContextModule extends
}
@Override
public String toString() {
return Objects.toStringHelper(client.getGuestOSApi()).add("method", "listOSTypes").toString();
return MoreObjects.toStringHelper(client.getGuestOSApi()).add("method", "listOSTypes").toString();
}
}, seconds, TimeUnit.SECONDS);
}
@@ -29,6 +29,7 @@ import org.jclouds.domain.LoginCredentials;
import org.jclouds.scriptbuilder.domain.Statement;
import com.google.common.base.Charsets;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -240,7 +241,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
@Override
public String toString() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("securityGroupIds", securityGroupIds)
.add("ipsToNetworks", ipsToNetworks)
.add("ipOnDefaultNetwork", ipOnDefaultNetwork)
@@ -26,8 +26,9 @@ import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ForwardingSet;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -776,7 +777,7 @@ public class Account extends ForwardingSet<User> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("type", type).add("networkDomain", networkDomain).add("domain", domain).add("domainId", domainId).add("IPsAvailable", IPsAvailable).add("IPLimit", IPLimit).add("IPs", IPs).add("cleanupRequired", cleanupRequired).add("name", name).add("receivedBytes", receivedBytes).add("sentBytes", sentBytes).add("snapshotsAvailable", snapshotsAvailable).add("snapshotLimit", snapshotLimit).add("snapshots", snapshots).add("state", state).add("templatesAvailable", templatesAvailable).add("templateLimit", templateLimit).add("templates", templates).add("VMsAvailable", VMsAvailable).add("VMLimit", VMLimit).add("VMsRunning", VMsRunning).add("VMsStopped", VMsStopped).add("VMs", VMs).add("volumesAvailable", volumesAvailable).add("volumeLimit", volumeLimit).add("volumes", volumes).add("users", users);
}
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Represents an alert issued by Cloudstack
@@ -150,7 +151,7 @@ public class Alert {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("description", description).add("sent", sent).add("type", type);
}
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Representation of the API keypair response
@@ -112,7 +113,7 @@ public class ApiKeyPair {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("apiKey", apiKey).add("secretKey", secretKey);
}
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class AsyncCreateResponse
@@ -119,7 +120,7 @@ public class AsyncCreateResponse {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("jobId", jobId);
}
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class AsyncJob
@@ -441,7 +442,7 @@ public class AsyncJob<S> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("accountId", accountId).add("cmd", cmd).add("created", created).add("id", id).add("instanceId", instanceId)
.add("instanceType", instanceType).add("progress", progress).add("result", result).add("resultCode", resultCode)
.add("resultType", resultType).add("status", status).add("userId", userId).add("error", error);
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
public class AsyncJobError {
@@ -149,7 +150,7 @@ public class AsyncJobError {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("errorCode", errorCode).add("errorText", errorText);
}
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class Capabilities
@@ -175,7 +176,7 @@ public class Capabilities {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("cloudStackVersion", cloudStackVersion).add("securityGroupsEnabled", securityGroupsEnabled).add("canShareTemplates", canShareTemplates).add("firewallRuleUiEnabled", firewallRuleUiEnabled).add("supportELB", supportELB);
}
@@ -24,8 +24,9 @@ import java.util.Map;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -266,7 +267,7 @@ public class Capacity implements Comparable<Capacity> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("capacityTotal", capacityTotal).add("capacityUsed", capacityUsed).add("percentUsed", percentUsed)
.add("podId", podId).add("podName", podName).add("type", type).add("zoneId", zoneId).add("zoneName", zoneName);
}
@@ -24,8 +24,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Represents a CloudStack Cluster.
@@ -284,7 +285,7 @@ public class Cluster implements Comparable<Cluster> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("allocationState", allocationState).add("clusterType", clusterType).add("hypervisor", hypervisor)
.add("managedState", managedState).add("name", name).add("podId", podId).add("podName", podName).add("zoneId", zoneId).add("zoneName", zoneName);
}
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Representation of the API configuration entry response
@@ -149,7 +150,7 @@ public class ConfigurationEntry implements Comparable<ConfigurationEntry> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("category", category).add("description", description).add("name", name).add("value", value);
}
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -276,7 +277,7 @@ public class DiskOffering implements Comparable<DiskOffering> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("domain", domain)
.add("domainId", domainId).add("diskSize", diskSize).add("customized", customized).add("tags", tags);
}
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Representation of the API domain response
@@ -202,7 +203,7 @@ public class Domain implements Comparable<Domain> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("hasChild", hasChild).add("level", level).add("name", name).add("networkDomain", networkDomain).add("parentDomainId", parentDomainId).add("parentDomainName", parentDomainName);
}
@@ -20,6 +20,7 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
public final class EncryptedPasswordAndPrivateKey {
@@ -106,7 +107,7 @@ public final class EncryptedPasswordAndPrivateKey {
@Override
public String toString() {
return Objects.toStringHelper(this).omitNullValues()
return MoreObjects.toStringHelper(this).omitNullValues()
.add("encryptedPassword", encryptedPassword).add("privateKey", privateKey).toString();
}
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class Event
@@ -313,7 +314,7 @@ public class Event implements Comparable<Event> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("description", description).add("created", created)
.add("domain", domain).add("domainId", domainId).add("level", level).add("parentId", parentId)
.add("state", state).add("type", type).add("username", username);
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -341,7 +342,7 @@ public class FirewallRule implements Comparable<FirewallRule> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("CIDRs", CIDRs).add("startPort", startPort).add("endPort", endPort).add("icmpCode", icmpCode)
.add("icmpType", icmpType).add("ipAddress", ipAddress).add("ipAddressId", ipAddressId).add("protocol", protocol).add("state", state)
.add("tags", tags);
@@ -26,8 +26,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -930,7 +931,7 @@ public class Host implements Comparable<Host> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("allocationState", allocationState).add("averageLoad", averageLoad)
.add("capabilities", capabilities).add("clusterId", clusterId).add("clusterName", clusterName)
.add("clusterType", clusterType).add("cpuAllocated", cpuAllocated).add("cpuNumber", cpuNumber)
@@ -23,8 +23,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -402,7 +403,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("IPAddress", IPAddress).add("IPAddressId", IPAddressId).add("startPort", startPort)
.add("protocol", protocol).add("endPort", endPort).add("state", state).add("virtualMachineDisplayName", virtualMachineDisplayName)
.add("virtualMachineId", virtualMachineId).add("virtualMachineName", virtualMachineName).add("publicPort", publicPort)
@@ -25,8 +25,9 @@ import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class ISO
@@ -776,7 +777,7 @@ public class ISO {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("accountId", accountId).add("bootable", bootable)
.add("checksum", checksum).add("created", created).add("crossZones", crossZones).add("displayText", displayText)
.add("domain", domain).add("domainid", domainid).add("format", format).add("hostId", hostId).add("hostName", hostName)
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class ISOExtraction
@@ -353,7 +354,7 @@ public class ISOExtraction {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("accountId", accountId).add("created", created).add("extractId", extractId).add("extractMode", extractMode)
.add("name", name).add("state", state).add("status", status).add("storageType", storageType).add("uploadPercentage", uploadPercentage)
.add("url", url).add("zoneId", zoneId).add("zoneName", zoneName);
@@ -23,8 +23,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -165,7 +166,7 @@ public class ISOPermissions {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("accounts", accounts).add("domainId", domainId).add("isPublic", isPublic);
}
@@ -23,8 +23,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
public class IngressRule implements Comparable<IngressRule> {
@@ -288,7 +289,7 @@ public class IngressRule implements Comparable<IngressRule> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("account", account).add("CIDR", CIDR).add("endPort", endPort).add("ICMPCode", ICMPCode)
.add("ICMPType", ICMPType).add("protocol", protocol).add("id", id).add("securityGroupName", securityGroupName).add("startPort", startPort)
.add("tags", tags);
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* The result of an operation.
@@ -114,7 +115,7 @@ public class JobResult {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this).add("success", success).add("displayText", displayText);
return MoreObjects.toStringHelper(this).add("success", success).add("displayText", displayText);
}
@Override
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -431,7 +432,7 @@ public class LoadBalancerRule {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("algorithm", algorithm).add("description", description).add("domain", domain).add("domainId", domainId).add("name", name).add("privatePort", privatePort).add("publicIP", publicIP).add("publicIPId", publicIPId).add("publicPort", publicPort).add("state", state).add("CIDRs", CIDRs).add("zoneId", zoneId);
}
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Representation of the login API call response
@@ -326,7 +327,7 @@ public class LoginResponse {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("username", username).add("userId", userId).add("password", password).add("domainId", domainId).add("timeout", timeout).add("registered", registered).add("accountName", accountName).add("firstName", firstName).add("lastName", lastName).add("accountType", accountType).add("timezone", timezone).add("timezoneOffset", timezoneOffset).add("sessionKey", sessionKey).add("jSessionId", jSessionId);
}
@@ -23,8 +23,9 @@ import java.net.URI;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class NIC
@@ -310,7 +311,7 @@ public class NIC {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("broadcastURI", broadcastURI).add("gateway", gateway).add("IPAddress", IPAddress)
.add("isDefault", isDefault).add("isolationURI", isolationURI).add("netmask", netmask).add("macAddress", macAddress)
.add("networkId", networkId).add("trafficType", trafficType).add("guestIPType", guestIPType);
@@ -25,8 +25,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
@@ -723,7 +724,7 @@ public class Network {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("broadcastDomainType", broadcastDomainType).add("broadcastURI", broadcastURI)
.add("displayText", displayText).add("DNS1", dns1).add("dns2", dns2).add("domain", domain).add("domainId", domainId)
.add("endIP", endIP).add("gateway", gateway).add("isDefault", isDefault).add("isShared", isShared).add("isSystem", isSystem)
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -338,7 +339,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("availability", availability).add("maxConnections", maxConnections).add("isDefault", isDefault).add("supportsVLAN", supportsVLAN).add("trafficType", trafficType).add("guestIPType", guestIPType).add("networkRate", networkRate).add("tags", tags);
}
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.ImmutableSortedSet;
@@ -122,7 +123,7 @@ public class NetworkService implements Comparable<NetworkService> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("name", name).add("value", value);
}
@@ -226,7 +227,7 @@ public class NetworkService implements Comparable<NetworkService> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this).add("name", name).add("capabilities", capabilities);
return MoreObjects.toStringHelper(this).add("name", name).add("capabilities", capabilities);
}
@Override
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class OSType
@@ -140,7 +141,7 @@ public class OSType implements Comparable<OSType> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this).add("id", id).add("OSCategoryId", OSCategoryId).add("description", description);
return MoreObjects.toStringHelper(this).add("id", id).add("OSCategoryId", OSCategoryId).add("description", description);
}
@Override
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Represents a Pod in CloudStack.
@@ -266,7 +267,7 @@ public class Pod implements Comparable<Pod> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("zoneId", zoneId).add("zoneName", zoneName).add("gateway", gateway).add("netmask", netmask).add("startIp", startIp).add("endIp", endIp).add("allocationState", allocationState);
}
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -437,7 +438,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("IPAddress", IPAddress).add("IPAddressId", IPAddressId).add("privatePort", privatePort)
.add("protocol", protocol).add("publicPort", publicPort).add("state", state).add("virtualMachineDisplayName", virtualMachineDisplayName)
.add("virtualMachineId", virtualMachineId).add("virtualMachineName", virtualMachineName).add("CIDRs", CIDRs)
@@ -25,8 +25,9 @@ import com.google.common.collect.ImmutableSet;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Representation of the API project response
@@ -248,7 +249,7 @@ public class Project implements Comparable<Project> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this).omitNullValues()
return MoreObjects.toStringHelper(this).omitNullValues()
.add("id", id).add("account", account).add("displayText", displayText)
.add("domain", domain).add("domainId", domainId).add("name", name).add("state", state)
.add("tags", tags);
@@ -26,8 +26,9 @@ import com.google.common.collect.ImmutableSet;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class PublicIPAddress
@@ -576,7 +577,7 @@ public class PublicIPAddress {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("allocated", allocated).add("associatedNetworkId", associatedNetworkId)
.add("domain", domain).add("domainId", domainId).add("usesVirtualNetwork", usesVirtualNetwork).add("IPAddress", IPAddress)
.add("isSourceNAT", isSourceNAT).add("isStaticNAT", isStaticNAT).add("networkId", networkId).add("state", state)
@@ -24,8 +24,9 @@ import java.util.Map;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -258,7 +259,7 @@ public class ResourceLimit {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("account", account).add("domain", domain).add("domainId", domainId).add("max", max).add("resourceType", resourceType);
}
@@ -23,8 +23,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
@@ -296,7 +297,7 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this).add("id", id).add("account", account).add("name", name).add("description", description)
return MoreObjects.toStringHelper(this).add("id", id).add("account", account).add("name", name).add("description", description)
.add("domain", domain).add("domainId", domainId).add("jobId", jobId).add("jobStatus", jobStatus).add("ingressRules", ingressRules)
.add("tags", tags);
}
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -435,7 +436,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("domain", domain)
.add("domainId", domainId).add("cpuNumber", cpuNumber).add("cpuSpeed", cpuSpeed).add("memory", memory)
.add("haSupport", haSupport).add("storageType", storageType).add("tags", getTags()).add("defaultUse", defaultUse)
@@ -26,8 +26,9 @@ import com.google.common.collect.ImmutableSet;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class Snapshot
@@ -453,7 +454,7 @@ public class Snapshot {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("created", created).add("domain", domain).add("domainId", domainId)
.add("interval", interval).add("jobId", jobId).add("jobStatus", jobStatus).add("name", name).add("snapshotType", snapshotType)
.add("state", state).add("volumeId", volumeId).add("volumeName", volumeName).add("volumeType", volumeType)
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class SnapshotPolicy
@@ -203,7 +204,7 @@ public class SnapshotPolicy {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("interval", interval).add("numberToRetain", numberToRetain).add("schedule", schedule).add("timezone", timezone)
.add("volumeId", volumeId);
}
@@ -20,8 +20,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Describes the schedule of a snapshot policy.
@@ -114,7 +115,7 @@ public class SnapshotPolicySchedule {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("interval", interval).add("time", time);
}
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class SshKeyPair
@@ -131,7 +132,7 @@ public class SshKeyPair {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("fingerprint", fingerprint).add("name", name).add("privateKey", privateKey);
}
@@ -25,8 +25,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
/**
@@ -466,7 +467,7 @@ public class StoragePool implements Comparable<StoragePool> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("path", path).add("tags", tags).add("state", state).add("type", type).add("zoneId", zoneId).add("zoneName", zoneName).add("podId", podId).add("podName", podName).add("clusterId", clusterId).add("clusterName", clusterName).add("created", created).add("diskSizeAllocated", diskSizeAllocated).add("diskSizeTotal", diskSizeTotal).add("ipAddress", ipAddress).add("jobId", jobId).add("jobStatus", jobStatus);
}
@@ -24,8 +24,9 @@ import java.util.Map;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -331,7 +332,7 @@ public class Tag {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("account", account)
.add("customer", customer)
.add("domain", domain)
@@ -24,8 +24,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
@@ -878,7 +879,7 @@ public class Template implements Comparable<Template> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("displayText", displayText).add("domain", domain).add("domainId", domainId).add("account", account).add("accountId", accountId).add("zone", zone).add("zoneId", zoneId).add("OSType", OSType).add("OSTypeId", OSTypeId).add("name", name).add("type", type).add("status", status).add("format", format).add("hypervisor", hypervisor).add("size", size).add("created", created).add("removed", removed).add("crossZones", crossZones).add("bootable", bootable).add("extractable", extractable).add("featured", featured).add("ispublic", ispublic).add("ready", ready).add("passwordEnabled", passwordEnabled).add("jobId", jobId).add("jobStatus", jobStatus).add("checksum", checksum).add("hostId", hostId).add("hostName", hostName).add("sourceTemplateId", sourceTemplateId).add("templateTag", templateTag).add("tags", tags);
}
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
public class TemplateExtraction implements Comparable<TemplateExtraction> {
@@ -350,7 +351,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("accountId", accountId).add("created", created).add("extractId", extractId).add("extractMode", extractMode).add("name", name).add("state", state).add("status", status).add("storageType", storageType).add("uploadPercentage", uploadPercentage).add("url", url).add("zoneId", zoneId).add("zoneName", zoneName);
}
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class TemplateMetadata
@@ -222,7 +223,7 @@ public class TemplateMetadata {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("name", name).add("osTypeId", osTypeId).add("displayText", displayText).add("snapshotId", snapshotId)
.add("volumeId", volumeId).add("virtualMachineId", virtualMachineId).add("passwordEnabled", passwordEnabled);
}
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
public class TemplatePermission {
@@ -165,7 +166,7 @@ public class TemplatePermission {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("domainId", domainId).add("isPublic", isPublic);
}
@@ -25,8 +25,9 @@ import java.util.Map;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -550,7 +551,7 @@ public class UsageRecord {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("description", description).add("accountId", accountId).add("accountName", accountName)
.add("domainId", domainId).add("startDate", startDate).add("endDate", endDate).add("assignDate", assignDate)
.add("releaseDate", releaseDate).add("zoneId", zoneId).add("virtualMachineId", virtualMachineId)
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class User
@@ -397,7 +398,7 @@ public class User {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("name", name).add("firstName", firstName).add("lastName", lastName).add("email", email)
.add("created", created).add("state", state).add("account", account).add("accountType", accountType).add("domain", domain)
.add("domainId", domainId).add("timeZone", timeZone).add("apiKey", apiKey).add("secretKey", secretKey);
@@ -23,8 +23,9 @@ import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Class VMGroup
@@ -204,7 +205,7 @@ public class VMGroup {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("created", created).add("domain", domain).add("domainId", domainId).add("name", name);
}
@@ -25,8 +25,9 @@ import java.util.Set;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
@@ -1050,7 +1051,7 @@ public class VirtualMachine {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("cpuCount", cpuCount).add("cpuSpeed", cpuSpeed).add("cpuUsed", cpuUsed)
.add("displayName", displayName).add("created", created).add("domain", domain).add("domainId", domainId)
.add("usesVirtualNetwork", usesVirtualNetwork).add("group", group).add("groupId", groupId).add("guestOSId", guestOSId)
@@ -22,8 +22,9 @@ import java.beans.ConstructorProperties;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Represents the data object used in CloudStack's "Vlan" API.
@@ -351,7 +352,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("description", description).add("forVirtualNetwork", forVirtualNetwork).add("zoneId", zoneId)
.add("vlan", vlan).add("account", account).add("domainId", domainId).add("domain", domain).add("podId", podId)
.add("podName", podName).add("gateway", gateway).add("netmask", netmask).add("startIP", startIP).add("endIP", endIP)
@@ -27,8 +27,9 @@ import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.CaseFormat;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -744,7 +745,7 @@ public class Volume {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("account", account).add("attached", attached).add("created", created).add("destroyed", destroyed)
.add("deviceId", deviceId).add("diskOfferingDisplayText", diskOfferingDisplayText).add("diskOfferingId", diskOfferingId)
.add("diskOfferingName", diskOfferingName).add("domain", domain).add("domainId", domainId).add("hypervisor", hypervisor)
@@ -25,8 +25,9 @@ import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableList;
public class Zone implements Comparable<Zone> {
@@ -440,7 +441,7 @@ public class Zone implements Comparable<Zone> {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("id", id).add("description", description).add("displayText", displayText).add("DNS1", dns1).add("DNS2", dns2)
.add("domain", domain).add("domainId", domainId).add("guestCIDRAddress", guestCIDRAddress).add("internalDNS1", internalDNS1)
.add("internalDNS2", internalDNS2).add("name", name).add("networkType", networkType).add("VLAN", vlan)
@@ -20,8 +20,9 @@ import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
/**
* Helpful when looking for resources by zone and name
@@ -87,6 +88,6 @@ public class ZoneAndName {
}
protected ToStringHelper string() {
return Objects.toStringHelper("").add("zoneId", zoneId).add("name", name);
return MoreObjects.toStringHelper("").add("zoneId", zoneId).add("name", name);
}
}
@@ -21,8 +21,9 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
public class ZoneSecurityGroupNamePortsCidrs extends ZoneAndName {
@@ -146,7 +147,7 @@ public class ZoneSecurityGroupNamePortsCidrs extends ZoneAndName {
}
protected ToStringHelper string() {
return Objects.toStringHelper(this)
return MoreObjects.toStringHelper(this)
.add("zoneId", zoneId).add("name", name).add("ports", ports).add("cidrs", cidrs);
}