Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace Guava toString() #576

Merged
merged 9 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sync with latest
  • Loading branch information
Sam Harrison committed Sep 22, 2020
commit 74ebe30ee142dace06c133cfc825a8d962488fb5
16 changes: 2 additions & 14 deletions src/main/java/com/twilio/rest/conversations/v1/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.exception.ApiConnectionException;
import com.twilio.exception.ApiException;
Expand All @@ -23,6 +22,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;

import java.io.IOException;
import java.io.InputStream;
Expand All @@ -35,6 +35,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Configuration extends Resource {
private static final long serialVersionUID = 46775139156552L;

Expand Down Expand Up @@ -228,17 +229,4 @@ public int hashCode() {
url,
links);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("accountSid", accountSid)
.add("defaultChatServiceSid", defaultChatServiceSid)
.add("defaultMessagingServiceSid", defaultMessagingServiceSid)
.add("defaultInactiveTimer", defaultInactiveTimer)
.add("defaultClosedTimer", defaultClosedTimer)
.add("url", url)
.add("links", links)
.toString();
}
}
17 changes: 2 additions & 15 deletions src/main/java/com/twilio/rest/conversations/v1/Credential.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.converter.Promoter;
Expand All @@ -25,6 +24,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -38,6 +38,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Credential extends Resource {
private static final long serialVersionUID = 225197611451747L;

Expand Down Expand Up @@ -295,18 +296,4 @@ public int hashCode() {
dateUpdated,
url);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("sid", sid)
.add("accountSid", accountSid)
.add("friendlyName", friendlyName)
.add("type", type)
.add("sandbox", sandbox)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("url", url)
.toString();
}
}
18 changes: 2 additions & 16 deletions src/main/java/com/twilio/rest/conversations/v1/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.converter.Promoter;
Expand All @@ -25,6 +24,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -39,6 +39,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Role extends Resource {
private static final long serialVersionUID = 19854929534813L;

Expand Down Expand Up @@ -317,19 +318,4 @@ public int hashCode() {
dateUpdated,
url);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("sid", sid)
.add("accountSid", accountSid)
.add("chatServiceSid", chatServiceSid)
.add("friendlyName", friendlyName)
.add("type", type)
.add("permissions", permissions)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("url", url)
.toString();
}
}
16 changes: 2 additions & 14 deletions src/main/java/com/twilio/rest/conversations/v1/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -24,6 +23,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -37,6 +37,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Service extends Resource {
private static final long serialVersionUID = 84226976776172L;

Expand Down Expand Up @@ -244,17 +245,4 @@ public int hashCode() {
url,
links);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("accountSid", accountSid)
.add("sid", sid)
.add("friendlyName", friendlyName)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("url", url)
.add("links", links)
.toString();
}
}
20 changes: 2 additions & 18 deletions src/main/java/com/twilio/rest/conversations/v1/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -24,6 +23,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -37,6 +37,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class User extends Resource {
private static final long serialVersionUID = 251738011021352L;

Expand Down Expand Up @@ -316,21 +317,4 @@ public int hashCode() {
dateUpdated,
url);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("sid", sid)
.add("accountSid", accountSid)
.add("chatServiceSid", chatServiceSid)
.add("roleSid", roleSid)
.add("identity", identity)
.add("friendlyName", friendlyName)
.add("attributes", attributes)
.add("isOnline", isOnline)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("url", url)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.converter.Promoter;
Expand All @@ -25,6 +24,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -39,6 +39,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Binding extends Resource {
private static final long serialVersionUID = 252683481132009L;

Expand Down Expand Up @@ -329,21 +330,4 @@ public int hashCode() {
messageTypes,
url);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("sid", sid)
.add("accountSid", accountSid)
.add("chatServiceSid", chatServiceSid)
.add("credentialSid", credentialSid)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("endpoint", endpoint)
.add("identity", identity)
.add("bindingType", bindingType)
.add("messageTypes", messageTypes)
.add("url", url)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.exception.ApiConnectionException;
import com.twilio.exception.ApiException;
Expand All @@ -23,6 +22,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;

import java.io.IOException;
import java.io.InputStream;
Expand All @@ -35,6 +35,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Configuration extends Resource {
private static final long serialVersionUID = 20772202953081L;

Expand Down Expand Up @@ -214,16 +215,4 @@ public int hashCode() {
url,
links);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("chatServiceSid", chatServiceSid)
.add("defaultConversationCreatorRoleSid", defaultConversationCreatorRoleSid)
.add("defaultConversationRoleSid", defaultConversationRoleSid)
.add("defaultChatServiceRoleSid", defaultChatServiceRoleSid)
.add("url", url)
.add("links", links)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.MoreObjects;
import com.twilio.base.Resource;
import com.twilio.converter.Converter;
import com.twilio.converter.DateConverter;
Expand All @@ -26,6 +25,7 @@
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import lombok.ToString;
import org.joda.time.DateTime;

import java.io.IOException;
Expand All @@ -39,6 +39,7 @@
* change. Use them with caution.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Conversation extends Resource {
private static final long serialVersionUID = 235657538705254L;

Expand Down Expand Up @@ -409,23 +410,4 @@ public int hashCode() {
url,
links);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("accountSid", accountSid)
.add("chatServiceSid", chatServiceSid)
.add("messagingServiceSid", messagingServiceSid)
.add("sid", sid)
.add("friendlyName", friendlyName)
.add("uniqueName", uniqueName)
.add("attributes", attributes)
.add("state", state)
.add("dateCreated", dateCreated)
.add("dateUpdated", dateUpdated)
.add("timers", timers)
.add("url", url)
.add("links", links)
.toString();
}
}
Loading