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

Migrate changes to upstream sdk #1

Open
wants to merge 12 commits into
base: cb-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
Expand Down
232 changes: 217 additions & 15 deletions src/main/java/org/zendesk/client/v2/Zendesk.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.zendesk.client.v2;

import org.asynchttpclient.Response;

import java.io.IOException;

public class ZendeskEntityNotFoundException extends ZendeskResponseException {
public ZendeskEntityNotFoundException(Response response) throws IOException {
super(response);
}
}
66 changes: 66 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/Page.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package org.zendesk.client.v2.model;

import java.util.Objects;

public class Page
{
int pageNo;
int perPage;

public Page()
{
}

public Page(int pageNo, int perPage)
{
this.pageNo = pageNo;
this.perPage = perPage;
}

public int getPageNo()
{
return pageNo;
}

public void setPageNo(int pageNo)
{
this.pageNo = pageNo;
}

public int getPerPage()
{
return perPage;
}

public void setPerPage(int perPage)
{
this.perPage = perPage;
}

@Override
public String toString()
{
return "Page{" +
"page=" + pageNo +
", perPage=" + perPage +
'}';
}

@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Page page1 = (Page) o;
return pageNo == page1.pageNo &&
perPage == page1.perPage;
}

@Override
public int hashCode()
{
return Objects.hash(pageNo, perPage);
}
}
62 changes: 62 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/Sorting.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package org.zendesk.client.v2.model;

import java.util.Objects;

public class Sorting
{
String sortBy;
SortOrder sortOrder;

public Sorting(String sortBy, SortOrder sortOrder)
{
this.sortBy = sortBy;
this.sortOrder = sortOrder;
}

public String getSortBy()
{
return sortBy;
}

public void setSortBy(String sortBy)
{
this.sortBy = sortBy;
}

public SortOrder getSortOrder()
{
return sortOrder;
}

public void setSortOrder(SortOrder sortOrder)
{
this.sortOrder = sortOrder;
}

@Override
public String toString()
{
return "Sorting{" +
"sortBy='" + sortBy + '\'' +
", sortOrder=" + sortOrder +
'}';
}

@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Sorting sorting = (Sorting) o;
return Objects.equals(sortBy, sorting.sortBy) &&
sortOrder == sorting.sortOrder;
}

@Override
public int hashCode()
{
return Objects.hash(sortBy, sortOrder);
}
}
213 changes: 213 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/SupportCenterLocale.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
package org.zendesk.client.v2.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class SupportCenterLocale implements Serializable
{
private static final long serialVersionUID = 1L;

/** Automatically assigned when creating items */
private Long id;

/** The API url of this item */
private String url;

/** ISO Locale code */
private String locale;

/** Human readable locale name */
private String name;

/** Human readable locale name on the locale language */
@JsonProperty("native_name")
private String nativeName;

/** Display name */
@JsonProperty("presentation_name")
private String presentationName;

/** Right to left flag */
private Boolean rtl;

/** If the locale is the default for the account */
@JsonProperty("default")
private Boolean isDefault;

/** When this record was created */
@JsonProperty("created_at")
private Date createdAt;

/** When this record last got updated */
@JsonProperty("updated_at")
private Date updatedAt;

public SupportCenterLocale()
{
}

public SupportCenterLocale(Long id, String url, String locale, String name, String nativeName, String presentationName, Boolean rtl, Boolean isDefault, Date createdAt, Date updatedAt)
{
this.id = id;
this.url = url;
this.locale = locale;
this.name = name;
this.nativeName = nativeName;
this.presentationName = presentationName;
this.rtl = rtl;
this.isDefault = isDefault;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
}

public static long getSerialVersionUID()
{
return serialVersionUID;
}

public Long getId()
{
return id;
}

public void setId(Long id)
{
this.id = id;
}

public String getUrl()
{
return url;
}

public void setUrl(String url)
{
this.url = url;
}

public String getLocale()
{
return locale;
}

public void setLocale(String locale)
{
this.locale = locale;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

public String getNativeName()
{
return nativeName;
}

public void setNativeName(String nativeName)
{
this.nativeName = nativeName;
}

public String getPresentationName()
{
return presentationName;
}

public void setPresentationName(String presentationName)
{
this.presentationName = presentationName;
}

public Boolean getRtl()
{
return rtl;
}

public void setRtl(Boolean rtl)
{
this.rtl = rtl;
}

public Boolean getDefault()
{
return isDefault;
}

public void setDefault(Boolean aDefault)
{
isDefault = aDefault;
}

public Date getCreatedAt()
{
return createdAt;
}

public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}

public Date getUpdatedAt()
{
return updatedAt;
}

public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}

@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
SupportCenterLocale that = (SupportCenterLocale) o;
return Objects.equals(id, that.id) &&
Objects.equals(url, that.url) &&
Objects.equals(locale, that.locale) &&
Objects.equals(name, that.name) &&
Objects.equals(nativeName, that.nativeName) &&
Objects.equals(presentationName, that.presentationName) &&
Objects.equals(rtl, that.rtl) &&
Objects.equals(isDefault, that.isDefault) &&
Objects.equals(createdAt, that.createdAt) &&
Objects.equals(updatedAt, that.updatedAt);
}

@Override
public int hashCode()
{
return Objects.hash(id, url, locale, name, nativeName, presentationName, rtl, isDefault, createdAt, updatedAt);
}

@Override
public String toString()
{
return "SupportLocale{" +
"id=" + id +
", url='" + url + '\'' +
", locale='" + locale + '\'' +
", name='" + name + '\'' +
", nativeName='" + nativeName + '\'' +
", presentationName='" + presentationName + '\'' +
", rtl=" + rtl +
", isDefault=" + isDefault +
", createdAt=" + createdAt +
", updatedAt=" + updatedAt +
'}';
}
}
Loading