From ae6450816f7aea4b3faea068864e675a0af70a3e Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Wed, 19 Sep 2018 14:02:37 -0400 Subject: [PATCH 001/163] Add CaseInsensitiveEnumTypeAdapterFactory --- .../servicestack/client/JsonSerializers.java | 52 ++++++++++++ .../client/JsonServiceClient.java | 1 + ...CaseInsensitiveTypeAdapterFactoryTest.java | 84 +++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 src/AndroidClient/client/src/test/java/utils/CaseInsensitiveTypeAdapterFactoryTest.java diff --git a/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonSerializers.java b/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonSerializers.java index 6578a5b8..f7ed10a0 100644 --- a/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonSerializers.java +++ b/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonSerializers.java @@ -3,6 +3,7 @@ package net.servicestack.client; +import com.google.gson.Gson; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; @@ -10,9 +11,19 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonToken; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; import java.lang.reflect.Type; import java.util.Date; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; import java.util.UUID; public class JsonSerializers { @@ -69,4 +80,45 @@ public UUID deserialize(JsonElement json, Type typeOfT, JsonDeserializationConte } }; } + + public static class CaseInsensitiveEnumTypeAdapterFactory implements TypeAdapterFactory { + public TypeAdapter create(Gson gson, TypeToken type) { + Class rawType = (Class) type.getRawType(); + if (!rawType.isEnum()) { + return null; + } + + final Map lowercaseToConstant = new HashMap(); + for (T constant : rawType.getEnumConstants()) { + lowercaseToConstant.put(toLowercase(constant), constant); + } + + return new TypeAdapter() { + public void write(JsonWriter out, T value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(value.toString()); + } + } + + public T read(JsonReader reader) throws IOException { + if (reader.peek() == JsonToken.NULL) { + reader.nextNull(); + return null; + } else { + return lowercaseToConstant.get(toLowercase(reader.nextString())); + } + } + }; + } + + private String toLowercase(Object o) { + return o.toString().toLowerCase(Locale.US); + } + } + + public static TypeAdapterFactory getCaseInsensitiveEnumTypeAdapterFactory() { + return new CaseInsensitiveEnumTypeAdapterFactory(); + } } diff --git a/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonServiceClient.java b/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonServiceClient.java index e9daeafb..059f00a4 100644 --- a/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonServiceClient.java +++ b/src/AndroidClient/client/src/main/java/net/servicestack/client/JsonServiceClient.java @@ -66,6 +66,7 @@ public void setTimeout(int timeoutMs) { public GsonBuilder getGsonBuilder() { return new GsonBuilder() + .registerTypeAdapterFactory(JsonSerializers.getCaseInsensitiveEnumTypeAdapterFactory()) .registerTypeAdapter(Date.class, JsonSerializers.getDateSerializer()) .registerTypeAdapter(Date.class, JsonSerializers.getDateDeserializer()) .registerTypeAdapter(TimeSpan.class, JsonSerializers.getTimeSpanSerializer()) diff --git a/src/AndroidClient/client/src/test/java/utils/CaseInsensitiveTypeAdapterFactoryTest.java b/src/AndroidClient/client/src/test/java/utils/CaseInsensitiveTypeAdapterFactoryTest.java new file mode 100644 index 00000000..411eca3d --- /dev/null +++ b/src/AndroidClient/client/src/test/java/utils/CaseInsensitiveTypeAdapterFactoryTest.java @@ -0,0 +1,84 @@ +package utils; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import junitparams.JUnitParamsRunner; +import junitparams.Parameters; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import junit.framework.TestCase; + +import net.servicestack.client.JsonSerializers; + +import static org.junit.Assert.assertEquals; + +enum SodaEnum +{ + Coke, + Pepsi, +} + +@RunWith(JUnitParamsRunner.class) +public class CaseInsensitiveTypeAdapterFactoryTest { + + private Gson gson; + + @Before + public void forEachTest() { + gson = new GsonBuilder() + .registerTypeAdapterFactory(new JsonSerializers.CaseInsensitiveEnumTypeAdapterFactory()) + .create(); + } + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + private Object[] validDeserializationTests() { + return new Object[]{ + new Object[]{"Pascal case", "Coke", SodaEnum.Coke}, + new Object[]{"Weird mixed case", "cOKe", SodaEnum.Coke}, + new Object[]{"lowercase", "pepsi", SodaEnum.Pepsi}, + new Object[]{"UPPERCASE", "PEPSI", SodaEnum.Pepsi}, + }; + } + + @Test + @Parameters(method = "validDeserializationTests") + public void fromJson_withValidText_ConvertsAsExpected(String reason, String jsonText, SodaEnum expected) { + SodaEnum actual = gson.fromJson(jsonText, SodaEnum.class); + + assertEquals(reason, expected, actual); + } + + private Object[] invalidDeserializationTests() { + return new Object[]{ + new Object[]{"Null should not deserialize", null}, + new Object[]{"Unknown type", "SevenUp"}, + }; + } + + @Test + @Parameters(method = "invalidDeserializationTests") + public void fromJson_withInvalidText_ReturnsNull(String reason, String jsonText){ + SodaEnum actual = gson.fromJson(jsonText, SodaEnum.class); + assertEquals(reason, null, actual); + } + + private Object[] validSerializationTests() { + return new Object[]{ + new Object[]{SodaEnum.Coke, "\"Coke\""}, + new Object[]{SodaEnum.Pepsi, "\"Pepsi\""}, + }; + } + + @Test + @Parameters(method = "validSerializationTests") + public void toJson_ConvertsAsExpected(SodaEnum value, String expected) { + String actual = gson.toJson(value); + + assertEquals("Serialized to json", expected, actual); + } +} From a67539fc3de99a8c245c975ec980b4c692b0e43f Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Wed, 19 Sep 2018 14:03:23 -0400 Subject: [PATCH 002/163] Update to latest version --- .../.idea/caches/build_file_checksums.ser | Bin 845 -> 845 bytes src/AndroidClient/android/android.iml | 24 +- src/AndroidClient/android/build.gradle | 14 +- src/AndroidClient/androidchat/androidchat.iml | 13 +- src/AndroidClient/androidchat/build.gradle | 18 +- src/AndroidClient/app/app.iml | 18 +- src/AndroidClient/app/build.gradle | 9 +- .../net/androidclient/techstacksdtos.java | 3 +- src/AndroidClient/build.gradle | 4 +- src/AndroidClient/client/build.gradle | 5 +- src/AndroidClient/client/client.iml | 11 + src/AndroidClient/client/pom.xml | 8 +- src/AndroidClient/kotlin/build.gradle | 14 +- src/AndroidClient/kotlin/kotlin.iml | 12 +- .../projectFilesBackup/.idea/workspace.xml | 6135 ------------ .../projectFilesBackup1/.idea/workspace.xml | 8391 ----------------- src/AndroidClient/techstacks/build.gradle | 9 +- .../net/techstacks/MainActivity.java | 4 +- src/AndroidClient/techstacks/techstacks.iml | 11 +- .../techstackskotlin/build.gradle | 17 +- .../techstackskotlin/techstackskotlin.iml | 18 +- 21 files changed, 136 insertions(+), 14602 deletions(-) delete mode 100644 src/AndroidClient/projectFilesBackup/.idea/workspace.xml delete mode 100644 src/AndroidClient/projectFilesBackup1/.idea/workspace.xml diff --git a/src/AndroidClient/.idea/caches/build_file_checksums.ser b/src/AndroidClient/.idea/caches/build_file_checksums.ser index 5f5236cbcf4fd402abbee51ad8d51ee4f917bfa3..6d501703c3b152e4cd18d82a93bdb3eccdcf788a 100644 GIT binary patch delta 196 zcmV;#06YK92F(VLmjz|={lKe{oOcj%vl@y*yB8A8!*U#s#TE0DBLPhi95#qra(HjB zAhNXQ+Ze&_lYjvw5OGG1D8p#-xqR0{hsc0H>yxzsULBLAeQ|K&7(0F=M=kAbzkYN8 z9du=5XmfO7V{3Dh@d6zXiFvv;IvMcE->fMt(E)dMlU)K)5KC4B95g6S_PgRkOvq`) y!IQoMAP`)`(P=nSy@~hM@WU;BC18{80w54_%q=JG>i=)TJlrT+g(-BC9s@5*oLEu- delta 196 zcmV;#06YK92F(VLmjzMC-;Z@AQ0fE%K#LlDHN6gFQSNOv?-JB0w55PG-7g`B)m7|j0JTQ4Z_Ql9s@70I92!n diff --git a/src/AndroidClient/android/android.iml b/src/AndroidClient/android/android.iml index 6d22e7a2..6d41a4f6 100644 --- a/src/AndroidClient/android/android.iml +++ b/src/AndroidClient/android/android.iml @@ -86,18 +86,25 @@ + + + + + + + @@ -109,22 +116,21 @@ + - - + + - - - - + + - + - - + + \ No newline at end of file diff --git a/src/AndroidClient/android/build.gradle b/src/AndroidClient/android/build.gradle index 39862cd9..ee33966a 100644 --- a/src/AndroidClient/android/build.gradle +++ b/src/AndroidClient/android/build.gradle @@ -5,13 +5,13 @@ apply plugin: 'com.jfrog.bintray' version = "1.0.34" dependencies { - compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0' - compile 'com.squareup.okhttp3:okhttp:3.6.0' - compile fileTree(include: '*.jar', dir: 'libs') - androidTestCompile 'junit:junit:4.12' - androidTestCompile 'com.android.support.test:runner:0.5' - androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' - androidTestCompile 'com.android.support:support-annotations:25.2.0' + implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.0' + implementation 'com.squareup.okhttp3:okhttp:3.7.0' + implementation fileTree(include: '*.jar', dir: 'libs') + androidTestImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'com.android.support:support-annotations:27.1.1' } android { diff --git a/src/AndroidClient/androidchat/androidchat.iml b/src/AndroidClient/androidchat/androidchat.iml index f57e7463..bcccafe8 100644 --- a/src/AndroidClient/androidchat/androidchat.iml +++ b/src/AndroidClient/androidchat/androidchat.iml @@ -88,7 +88,11 @@ + + + + @@ -96,7 +100,10 @@ + + + @@ -109,14 +116,13 @@ + - - @@ -125,6 +131,7 @@ + @@ -144,10 +151,10 @@ + - diff --git a/src/AndroidClient/androidchat/build.gradle b/src/AndroidClient/androidchat/build.gradle index 7546cc22..e210e1fb 100644 --- a/src/AndroidClient/androidchat/build.gradle +++ b/src/AndroidClient/androidchat/build.gradle @@ -45,17 +45,17 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile project(':android') - compile 'com.android.support:appcompat-v7:27.1.1' - compile 'com.android.support:design:27.1.1' - compile 'net.servicestack:android:1.0.27' - compile 'com.facebook.android:facebook-android-sdk:4.31.0' - compile('com.twitter.sdk.android:twitter:2.3.1@aar') { + implementation project(':android') + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:design:27.1.1' + implementation 'net.servicestack:android:1.0.27' + implementation 'com.facebook.android:facebook-android-sdk:4.31.0' + implementation('com.twitter.sdk.android:twitter:2.3.1@aar') { transitive = true; } - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.12' } diff --git a/src/AndroidClient/app/app.iml b/src/AndroidClient/app/app.iml index f38dc59a..8434b9a1 100644 --- a/src/AndroidClient/app/app.iml +++ b/src/AndroidClient/app/app.iml @@ -22,14 +22,14 @@ - + - + - + - - + + - + - + @@ -86,51 +86,54 @@ - - + + + + + - - + - + - - - + + + + - + - + + - + + - + + - - - + - \ No newline at end of file diff --git a/src/AndroidClient/android/build.gradle b/src/AndroidClient/android/build.gradle index ee33966a..df149ca0 100644 --- a/src/AndroidClient/android/build.gradle +++ b/src/AndroidClient/android/build.gradle @@ -5,22 +5,22 @@ apply plugin: 'com.jfrog.bintray' version = "1.0.34" dependencies { - implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.0' - implementation 'com.squareup.okhttp3:okhttp:3.7.0' + implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.2' + implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation fileTree(include: '*.jar', dir: 'libs') androidTestImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - androidTestImplementation 'com.android.support:support-annotations:27.1.1' + androidTestImplementation 'com.android.support:support-annotations:28.0.0' } android { - compileSdkVersion 25 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 15 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName version diff --git a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/AndroidServiceClientTests.java b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/AndroidServiceClientTests.java index c0e44311..7c84fc3a 100644 --- a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/AndroidServiceClientTests.java +++ b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/AndroidServiceClientTests.java @@ -1,20 +1,21 @@ package net.servicestack.android; -import android.app.Application; -import android.test.ApplicationTestCase; +import android.support.test.runner.AndroidJUnit4; -import net.servicestack.android.AndroidLogProvider; -import net.servicestack.android.AndroidServiceClient; import net.servicestack.client.Log; -public class AndroidServiceClientTests extends ApplicationTestCase { +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public class AndroidServiceClientTests { public AndroidServiceClientTests() { - super(Application.class); Log.Instance = new AndroidLogProvider("ZZZ"); } - AndroidServiceClient client = new AndroidServiceClient("http://techstacks.io"); + AndroidServiceClient client = new AndroidServiceClient("https://www.techstacks.io"); + @Test public void test(){ } diff --git a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/ApplicationTest.java b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/ApplicationTest.java index 00e5c77a..70331d83 100644 --- a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/ApplicationTest.java +++ b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/ApplicationTest.java @@ -1,9 +1,8 @@ package net.servicestack.android; -import android.app.Application; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.test.ApplicationTestCase; +import android.support.test.runner.AndroidJUnit4; import com.google.gson.annotations.SerializedName; @@ -11,20 +10,25 @@ import net.servicestack.client.Flags; import net.servicestack.client.Utils; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.net.HttpURLConnection; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import static junit.framework.TestCase.assertTrue; +import static org.junit.Assert.assertEquals; + /** * Testing Fundamentals */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } +@RunWith(AndroidJUnit4.class) +public class ApplicationTest { AndroidServiceClient client = new AndroidServiceClient("http://techstacks.io"); + @Test public void test_Can_download_image_bytes(){ HttpURLConnection httpRes = client.get("https://servicestack.net/img/logo.png"); byte[] imgBytes = Utils.readBytesToEnd(httpRes); @@ -34,6 +38,7 @@ public void test_Can_download_image_bytes(){ assertEquals(55, img.getHeight()); } + @Test public void test_Can_download_image_bytes_Async() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); diff --git a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTests.java b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTests.java index d2fe1187..17b2a2cf 100644 --- a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTests.java +++ b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTests.java @@ -1,25 +1,46 @@ package net.servicestack.android.techstacks; +import android.support.test.runner.AndroidJUnit4; + import junit.framework.TestCase; import net.servicestack.client.JsonServiceClient; import net.servicestack.client.Utils; import net.servicestack.client.WebServiceException; -import java.io.FileInputStream; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; -import static net.servicestack.android.techstacks.dtos.*; - +import static net.servicestack.android.techstacks.dtos.AppOverview; +import static net.servicestack.android.techstacks.dtos.AppOverviewResponse; +import static net.servicestack.android.techstacks.dtos.FindTechnologies; +import static net.servicestack.android.techstacks.dtos.GetTechnology; +import static net.servicestack.android.techstacks.dtos.GetTechnologyResponse; +import static net.servicestack.android.techstacks.dtos.LockStackResponse; +import static net.servicestack.android.techstacks.dtos.LockTechStack; +import static net.servicestack.android.techstacks.dtos.Option; +import static net.servicestack.android.techstacks.dtos.Overview; +import static net.servicestack.android.techstacks.dtos.OverviewResponse; +import static net.servicestack.android.techstacks.dtos.QueryResponse; +import static net.servicestack.android.techstacks.dtos.TechStackDetails; +import static net.servicestack.android.techstacks.dtos.Technology; +import static net.servicestack.android.techstacks.dtos.TechnologyInStack; +import static net.servicestack.android.techstacks.dtos.TechnologyInfo; +import static net.servicestack.android.techstacks.dtos.TechnologyTier; + +@RunWith(AndroidJUnit4.class) public class TechStacksServiceTests extends TestCase { public TechStacksServiceTests() { } - JsonServiceClient client = new JsonServiceClient("http://techstacks.io"); + JsonServiceClient client = new JsonServiceClient("https://www.techstacks.io"); + @Test public void test_Can_GET_TechStacks_Overview(){ OverviewResponse response = client.get(new Overview()); @@ -28,6 +49,7 @@ public void test_Can_GET_TechStacks_Overview(){ assertOverviewResponse(response); } + @Test public void test_Can_GET_TechStacks_AppOverview(){ AppOverviewResponse r = client.get(new AppOverview()); assertNotNull(r); @@ -35,16 +57,19 @@ public void test_Can_GET_TechStacks_AppOverview(){ assertTrue(r.getAllTiers().size() > 0); } + @Test public void test_Can_GET_TechStacks_Overview_with_relative_url() { OverviewResponse response = client.get("/overview", OverviewResponse.class); assertOverviewResponse(response); } + @Test public void test_Can_GET_TechStacks_Overview_with_absolute_url() { - OverviewResponse response = client.get("http://techstacks.io/overview", OverviewResponse.class); + OverviewResponse response = client.get("https://www.techstacks.io/overview", OverviewResponse.class); assertOverviewResponse(response); } + @Test public void test_Can_GET_GetTechnology_with_params() { GetTechnology requestDto = new GetTechnology() .setSlug("servicestack"); @@ -53,11 +78,13 @@ public void test_Can_GET_GetTechnology_with_params() { assertGetTechnologyResponse(response); } + @Test public void test_Can_GET_GetTechnology_with_url() { GetTechnologyResponse response = client.get("/technology/servicestack", GetTechnologyResponse.class); assertGetTechnologyResponse(response); } + @Test public void test_Can_call_FindTechnologies_AutoQuery_Service() { FindTechnologies request = new FindTechnologies() .setName("ServiceStack"); @@ -67,6 +94,7 @@ public void test_Can_call_FindTechnologies_AutoQuery_Service() { assertEquals(1, response.getResults().size()); } + @Test public void test_Can_call_FindTechnologies_AutoQuery_Implicit_Service() { FindTechnologies request = (FindTechnologies) new FindTechnologies() .setTake(5); @@ -77,6 +105,7 @@ public void test_Can_call_FindTechnologies_AutoQuery_Implicit_Service() { assertEquals(5, response.getResults().size()); } + @Test public void test_Can_serialize_Empty_Option() { Option dto = new Option(); @@ -85,6 +114,7 @@ public void test_Can_serialize_Empty_Option() { assertEquals("{}", json); } + @Test public void test_Can_deserialize_Empty_Option() { String json = "{\"name\":null,\"title\":null,\"value\":null}"; @@ -95,6 +125,7 @@ public void test_Can_deserialize_Empty_Option() { assertNull(dto.getValue()); } + @Test public void test_Can_serialize_Full_Option() { Option dto = new Option() .setName("name") @@ -106,6 +137,7 @@ public void test_Can_serialize_Full_Option() { assertEquals("{\"name\":\"name\",\"title\":\"title\",\"value\":\"ProgrammingLanguage\"}", json); } + @Test public void test_Can_deserialize_Full_Option() { String json = "{\"name\":\"name\",\"title\":\"title\",\"value\":\"ProgrammingLanguage\"}"; @@ -116,6 +148,7 @@ public void test_Can_deserialize_Full_Option() { assertEquals(TechnologyTier.ProgrammingLanguage, dto.getValue()); } + @Test public void test_does_handle_auth_failure() { JsonServiceClient techStacksClient = new JsonServiceClient("http://techstacks.io/"); int errorCode = 0; @@ -131,6 +164,7 @@ public void test_does_handle_auth_failure() { assertEquals(errorCode, 401); } + @Test public void test_Can_deserialize_Overview() throws IOException { if ("1".equals("1")) return; //Ignore until we work out how to add resources to android test only @@ -162,7 +196,7 @@ public void test_Can_deserialize_Overview() throws IOException { assertEquals(1, (long)techstacks.getId()); assertEquals("TechStacks Website", techstacks.getName()); assertEquals("ServiceStack", techstacks.getVendorName()); - assertTrue(techstacks.Description.startsWith("This Website! ")); + assertTrue(techstacks.description.startsWith("This Website! ")); assertEquals("http://techstacks.io", techstacks.getAppUrl()); assertEquals("https://raw.githubusercontent.com/ServiceStack/Assets/master/img/livedemos/techstacks/screenshots/techstacks.png", techstacks.getScreenshotUrl()); assertEquals(Utils.parseDate("2015-01-01T17:33:58.9892560"), techstacks.getCreated()); diff --git a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTestsAsync.java b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTestsAsync.java index 50bca83c..cfe171bf 100644 --- a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTestsAsync.java +++ b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/TechStacksServiceTestsAsync.java @@ -1,7 +1,6 @@ package net.servicestack.android.techstacks; -import android.app.Application; -import android.test.ApplicationTestCase; +import android.support.test.runner.AndroidJUnit4; import net.servicestack.android.AndroidLogProvider; import net.servicestack.android.AndroidServiceClient; @@ -9,19 +8,34 @@ import net.servicestack.client.Log; import net.servicestack.client.Utils; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static net.servicestack.android.techstacks.dtos.*; - -public class TechStacksServiceTestsAsync extends ApplicationTestCase { +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertTrue; +import static net.servicestack.android.techstacks.dtos.AppOverview; +import static net.servicestack.android.techstacks.dtos.AppOverviewResponse; +import static net.servicestack.android.techstacks.dtos.FindTechnologies; +import static net.servicestack.android.techstacks.dtos.GetTechnology; +import static net.servicestack.android.techstacks.dtos.GetTechnologyResponse; +import static net.servicestack.android.techstacks.dtos.Overview; +import static net.servicestack.android.techstacks.dtos.OverviewResponse; +import static net.servicestack.android.techstacks.dtos.QueryResponse; +import static net.servicestack.android.techstacks.dtos.Technology; +import static org.junit.Assert.assertEquals; + +@RunWith(AndroidJUnit4.class) +public class TechStacksServiceTestsAsync { public TechStacksServiceTestsAsync() { - super(Application.class); Log.Instance = new AndroidLogProvider("ZZZ"); } - AndroidServiceClient client = new AndroidServiceClient("http://techstacks.io"); + AndroidServiceClient client = new AndroidServiceClient("https://www.techstacks.io"); + @Test public void test_Can_GET_TechStacks_Overview() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); @@ -40,6 +54,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_GET_TechStacks_AppOverview_Async() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); @@ -60,6 +75,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_GET_TechStacks_Overview_with_relative_url_Async() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); @@ -78,6 +94,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_GET_TechStacks_Overview_with_absolute_url_Async() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); @@ -96,6 +113,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_GET_GetTechnology_with_params_Async() throws InterruptedException { GetTechnology requestDto = new GetTechnology() .setSlug("servicestack"); @@ -117,6 +135,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_GET_GetTechnology_with_url_Async() throws InterruptedException { final CountDownLatch signal = new CountDownLatch(1); @@ -135,6 +154,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_call_FindTechnologies_AutoQuery_Service_Async() throws InterruptedException { FindTechnologies request = new FindTechnologies() .setName("ServiceStack"); @@ -157,6 +177,7 @@ public void complete() { assertTrue(signal.await(5, TimeUnit.SECONDS)); } + @Test public void test_Can_call_FindTechnologies_AutoQuery_Implicit_Service() throws InterruptedException { FindTechnologies request = (FindTechnologies) new FindTechnologies() .setTake(5); diff --git a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/dtos.java b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/dtos.java index 68db7b64..94b85120 100644 --- a/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/dtos.java +++ b/src/AndroidClient/android/src/androidTest/java/net/servicestack/android/techstacks/dtos.java @@ -1,17 +1,20 @@ /* Options: -Date: 2015-04-10 12:38:16 -Version: 1 -BaseUrl: http://techstacks.io +Date: 2018-10-17 14:36:01 +Version: 5.10 +Tip: To override a DTO option, remove "//" prefix before updating +BaseUrl: https://www.techstacks.io -Package: io.techstacks -//GlobalNamespace: dto +Package: net.servicestack.android.techstacks +//GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False -//AddImplicitVersion: -//IncludeTypes: -//ExcludeTypes: +//AddDescriptionAsComments: True +//AddImplicitVersion: +//IncludeTypes: +//ExcludeTypes: +//TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ @@ -23,9 +26,12 @@ import net.servicestack.client.AutoQueryViewer; import net.servicestack.client.DataContract; import net.servicestack.client.DataMember; +import net.servicestack.client.IPost; import net.servicestack.client.IReturn; +import net.servicestack.client.IReturnVoid; import net.servicestack.client.ResponseStatus; import net.servicestack.client.Route; +import net.servicestack.client.StringLength; import java.util.ArrayList; import java.util.Date; @@ -34,817 +40,1050 @@ public class dtos { - public static class Technology extends TechnologyBase + @Route("/ping") + public static class Ping { - - } - public static enum TechnologyTier - { - ProgrammingLanguage, - Client, - Http, - Server, - Data, - SoftwareInfrastructure, - OperatingSystem, - HardwareInfrastructure, - ThirdPartyServices; } - public static class TechnologyStack extends TechnologyStackBase + public static class DummyTypes { - + public ArrayList post = null; + + public ArrayList getPost() { return post; } + public DummyTypes setPost(ArrayList value) { this.post = value; return this; } } - public static class TechnologyHistory extends TechnologyBase + @Route(Path="/orgs/{Id}", Verbs="GET") + public static class GetOrganization implements IReturn { - public Long TechnologyId = null; - public String Operation = null; - - public Long getTechnologyId() { return TechnologyId; } - public TechnologyHistory setTechnologyId(Long value) { this.TechnologyId = value; return this; } - public String getOperation() { return Operation; } - public TechnologyHistory setOperation(String value) { this.Operation = value; return this; } + public Integer id = null; + + public Integer getId() { return id; } + public GetOrganization setId(Integer value) { this.id = value; return this; } + private static Object responseType = GetOrganizationResponse.class; + public Object getResponseType() { return responseType; } } - public static class QueryBase_1 extends QueryBase + @Route(Path="/organizations/{Slug}", Verbs="GET") + public static class GetOrganizationBySlug implements IReturn { - + public String slug = null; + + public String getSlug() { return slug; } + public GetOrganizationBySlug setSlug(String value) { this.slug = value; return this; } + private static Object responseType = GetOrganizationResponse.class; + public Object getResponseType() { return responseType; } } - public static class TechStackDetails extends TechnologyStackBase + @Route(Path="/orgs/{Id}/members", Verbs="GET") + public static class GetOrganizationMembers implements IReturn { - public String DetailsHtml = null; - public ArrayList TechnologyChoices = null; - - public String getDetailsHtml() { return DetailsHtml; } - public TechStackDetails setDetailsHtml(String value) { this.DetailsHtml = value; return this; } - public ArrayList getTechnologyChoices() { return TechnologyChoices; } - public TechStackDetails setTechnologyChoices(ArrayList value) { this.TechnologyChoices = value; return this; } + public Integer id = null; + + public Integer getId() { return id; } + public GetOrganizationMembers setId(Integer value) { this.id = value; return this; } + private static Object responseType = GetOrganizationMembersResponse.class; + public Object getResponseType() { return responseType; } } - public static class TechnologyStackHistory extends TechnologyStackBase + @Route(Path="/orgs/{Id}/admin", Verbs="GET") + public static class GetOrganizationAdmin implements IReturn { - public Long TechnologyStackId = null; - public String Operation = null; - public ArrayList TechnologyIds = null; - - public Long getTechnologyStackId() { return TechnologyStackId; } - public TechnologyStackHistory setTechnologyStackId(Long value) { this.TechnologyStackId = value; return this; } - public String getOperation() { return Operation; } - public TechnologyStackHistory setOperation(String value) { this.Operation = value; return this; } - public ArrayList getTechnologyIds() { return TechnologyIds; } - public TechnologyStackHistory setTechnologyIds(ArrayList value) { this.TechnologyIds = value; return this; } + public Integer id = null; + + public Integer getId() { return id; } + public GetOrganizationAdmin setId(Integer value) { this.id = value; return this; } + private static Object responseType = GetOrganizationAdminResponse.class; + public Object getResponseType() { return responseType; } } - @DataContract - public static class Option + @Route(Path="/orgs/posts/new", Verbs="POST") + public static class CreateOrganizationForTechnology implements IReturn { - @DataMember(Name="name") - @SerializedName("name") - public String Name = null; + public Long technologyId = null; + public Long techStackId = null; - @DataMember(Name="title") - @SerializedName("title") - public String Title = null; + public Long getTechnologyId() { return technologyId; } + public CreateOrganizationForTechnology setTechnologyId(Long value) { this.technologyId = value; return this; } + public Long getTechStackId() { return techStackId; } + public CreateOrganizationForTechnology setTechStackId(Long value) { this.techStackId = value; return this; } + private static Object responseType = CreateOrganizationForTechnologyResponse.class; + public Object getResponseType() { return responseType; } + } - @DataMember(Name="value") - @SerializedName("value") - public TechnologyTier Value = null; - - public String getName() { return Name; } - public Option setName(String value) { this.Name = value; return this; } - public String getTitle() { return Title; } - public Option setTitle(String value) { this.Title = value; return this; } - public TechnologyTier getValue() { return Value; } - public Option setValue(TechnologyTier value) { this.Value = value; return this; } + @Route(Path="/orgs", Verbs="POST") + public static class CreateOrganization implements IReturn + { + public String name = null; + public String slug = null; + public String description = null; + public Long refId = null; + public String refSource = null; + public String refUrn = null; + + public String getName() { return name; } + public CreateOrganization setName(String value) { this.name = value; return this; } + public String getSlug() { return slug; } + public CreateOrganization setSlug(String value) { this.slug = value; return this; } + public String getDescription() { return description; } + public CreateOrganization setDescription(String value) { this.description = value; return this; } + public Long getRefId() { return refId; } + public CreateOrganization setRefId(Long value) { this.refId = value; return this; } + public String getRefSource() { return refSource; } + public CreateOrganization setRefSource(String value) { this.refSource = value; return this; } + public String getRefUrn() { return refUrn; } + public CreateOrganization setRefUrn(String value) { this.refUrn = value; return this; } + private static Object responseType = CreateOrganizationResponse.class; + public Object getResponseType() { return responseType; } } - public static class UserInfo + @Route(Path="/orgs/{Id}", Verbs="PUT") + public static class UpdateOrganization implements IReturn + { + public Integer id = null; + public String slug = null; + public String name = null; + public String description = null; + public String color = null; + public String textColor = null; + public String linkColor = null; + public String backgroundColor = null; + public String backgroundUrl = null; + public String logoUrl = null; + public String heroUrl = null; + public String lang = null; + public Integer deletePostsWithReportCount = null; + public Boolean disableInvites = null; + public String defaultPostType = null; + public ArrayList defaultSubscriptionPostTypes = null; + public ArrayList postTypes = null; + public ArrayList moderatorPostTypes = null; + public ArrayList technologyIds = null; + + public Integer getId() { return id; } + public UpdateOrganization setId(Integer value) { this.id = value; return this; } + public String getSlug() { return slug; } + public UpdateOrganization setSlug(String value) { this.slug = value; return this; } + public String getName() { return name; } + public UpdateOrganization setName(String value) { this.name = value; return this; } + public String getDescription() { return description; } + public UpdateOrganization setDescription(String value) { this.description = value; return this; } + public String getColor() { return color; } + public UpdateOrganization setColor(String value) { this.color = value; return this; } + public String getTextColor() { return textColor; } + public UpdateOrganization setTextColor(String value) { this.textColor = value; return this; } + public String getLinkColor() { return linkColor; } + public UpdateOrganization setLinkColor(String value) { this.linkColor = value; return this; } + public String getBackgroundColor() { return backgroundColor; } + public UpdateOrganization setBackgroundColor(String value) { this.backgroundColor = value; return this; } + public String getBackgroundUrl() { return backgroundUrl; } + public UpdateOrganization setBackgroundUrl(String value) { this.backgroundUrl = value; return this; } + public String getLogoUrl() { return logoUrl; } + public UpdateOrganization setLogoUrl(String value) { this.logoUrl = value; return this; } + public String getHeroUrl() { return heroUrl; } + public UpdateOrganization setHeroUrl(String value) { this.heroUrl = value; return this; } + public String getLang() { return lang; } + public UpdateOrganization setLang(String value) { this.lang = value; return this; } + public Integer getDeletePostsWithReportCount() { return deletePostsWithReportCount; } + public UpdateOrganization setDeletePostsWithReportCount(Integer value) { this.deletePostsWithReportCount = value; return this; } + public Boolean isDisableInvites() { return disableInvites; } + public UpdateOrganization setDisableInvites(Boolean value) { this.disableInvites = value; return this; } + public String getDefaultPostType() { return defaultPostType; } + public UpdateOrganization setDefaultPostType(String value) { this.defaultPostType = value; return this; } + public ArrayList getDefaultSubscriptionPostTypes() { return defaultSubscriptionPostTypes; } + public UpdateOrganization setDefaultSubscriptionPostTypes(ArrayList value) { this.defaultSubscriptionPostTypes = value; return this; } + public ArrayList getPostTypes() { return postTypes; } + public UpdateOrganization setPostTypes(ArrayList value) { this.postTypes = value; return this; } + public ArrayList getModeratorPostTypes() { return moderatorPostTypes; } + public UpdateOrganization setModeratorPostTypes(ArrayList value) { this.moderatorPostTypes = value; return this; } + public ArrayList getTechnologyIds() { return technologyIds; } + public UpdateOrganization setTechnologyIds(ArrayList value) { this.technologyIds = value; return this; } + private static Object responseType = UpdateOrganizationResponse.class; + public Object getResponseType() { return responseType; } + } + + @Route(Path="/orgs/{Id}", Verbs="DELETE") + public static class DeleteOrganization implements IReturnVoid { - public String UserName = null; - public String AvatarUrl = null; - public Integer StacksCount = null; - - public String getUserName() { return UserName; } - public UserInfo setUserName(String value) { this.UserName = value; return this; } - public String getAvatarUrl() { return AvatarUrl; } - public UserInfo setAvatarUrl(String value) { this.AvatarUrl = value; return this; } - public Integer getStacksCount() { return StacksCount; } - public UserInfo setStacksCount(Integer value) { this.StacksCount = value; return this; } + public Integer id = null; + + public Integer getId() { return id; } + public DeleteOrganization setId(Integer value) { this.id = value; return this; } } - public static class TechnologyInfo + @Route(Path="/orgs/{Id}/lock", Verbs="PUT") + public static class LockOrganization implements IReturnVoid { - public TechnologyTier Tier = null; - public String Slug = null; - public String Name = null; - public String LogoUrl = null; - public Integer StacksCount = null; - - public TechnologyTier getTier() { return Tier; } - public TechnologyInfo setTier(TechnologyTier value) { this.Tier = value; return this; } - public String getSlug() { return Slug; } - public TechnologyInfo setSlug(String value) { this.Slug = value; return this; } - public String getName() { return Name; } - public TechnologyInfo setName(String value) { this.Name = value; return this; } - public String getLogoUrl() { return LogoUrl; } - public TechnologyInfo setLogoUrl(String value) { this.LogoUrl = value; return this; } - public Integer getStacksCount() { return StacksCount; } - public TechnologyInfo setStacksCount(Integer value) { this.StacksCount = value; return this; } + public Integer id = null; + public Boolean lock = null; + public String reason = null; + + public Integer getId() { return id; } + public LockOrganization setId(Integer value) { this.id = value; return this; } + public Boolean isLock() { return lock; } + public LockOrganization setLock(Boolean value) { this.lock = value; return this; } + public String getReason() { return reason; } + public LockOrganization setReason(String value) { this.reason = value; return this; } } - public static class Post + @Route(Path="/orgs/{OrganizationId}/labels", Verbs="POST") + public static class AddOrganizationLabel implements IReturn { - public Integer Id = null; - public String UserId = null; - public String UserName = null; - public String Date = null; - public String ShortDate = null; - public String TextHtml = null; - public ArrayList Comments = null; - - public Integer getId() { return Id; } - public Post setId(Integer value) { this.Id = value; return this; } - public String getUserId() { return UserId; } - public Post setUserId(String value) { this.UserId = value; return this; } - public String getUserName() { return UserName; } - public Post setUserName(String value) { this.UserName = value; return this; } - public String getDate() { return Date; } - public Post setDate(String value) { this.Date = value; return this; } - public String getShortDate() { return ShortDate; } - public Post setShortDate(String value) { this.ShortDate = value; return this; } - public String getTextHtml() { return TextHtml; } - public Post setTextHtml(String value) { this.TextHtml = value; return this; } - public ArrayList getComments() { return Comments; } - public Post setComments(ArrayList value) { this.Comments = value; return this; } + public Integer organizationId = null; + public String slug = null; + public String description = null; + public String color = null; + + public Integer getOrganizationId() { return organizationId; } + public AddOrganizationLabel setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getSlug() { return slug; } + public AddOrganizationLabel setSlug(String value) { this.slug = value; return this; } + public String getDescription() { return description; } + public AddOrganizationLabel setDescription(String value) { this.description = value; return this; } + public String getColor() { return color; } + public AddOrganizationLabel setColor(String value) { this.color = value; return this; } + private static Object responseType = OrganizationLabelResponse.class; + public Object getResponseType() { return responseType; } } - public static class TechnologyBase + @Route(Path="/orgs/{OrganizationId}/members/{Slug}", Verbs="PUT") + public static class UpdateOrganizationLabel implements IReturn { - public Long Id = null; - public String Name = null; - public String VendorName = null; - public String VendorUrl = null; - public String ProductUrl = null; - public String LogoUrl = null; - public String Description = null; - public Date Created = null; - public String CreatedBy = null; - public Date LastModified = null; - public String LastModifiedBy = null; - public String OwnerId = null; - public String Slug = null; - public Boolean LogoApproved = null; - public Boolean IsLocked = null; - public TechnologyTier Tier = null; - public Date LastStatusUpdate = null; - - public Long getId() { return Id; } - public TechnologyBase setId(Long value) { this.Id = value; return this; } - public String getName() { return Name; } - public TechnologyBase setName(String value) { this.Name = value; return this; } - public String getVendorName() { return VendorName; } - public TechnologyBase setVendorName(String value) { this.VendorName = value; return this; } - public String getVendorUrl() { return VendorUrl; } - public TechnologyBase setVendorUrl(String value) { this.VendorUrl = value; return this; } - public String getProductUrl() { return ProductUrl; } - public TechnologyBase setProductUrl(String value) { this.ProductUrl = value; return this; } - public String getLogoUrl() { return LogoUrl; } - public TechnologyBase setLogoUrl(String value) { this.LogoUrl = value; return this; } - public String getDescription() { return Description; } - public TechnologyBase setDescription(String value) { this.Description = value; return this; } - public Date getCreated() { return Created; } - public TechnologyBase setCreated(Date value) { this.Created = value; return this; } - public String getCreatedBy() { return CreatedBy; } - public TechnologyBase setCreatedBy(String value) { this.CreatedBy = value; return this; } - public Date getLastModified() { return LastModified; } - public TechnologyBase setLastModified(Date value) { this.LastModified = value; return this; } - public String getLastModifiedBy() { return LastModifiedBy; } - public TechnologyBase setLastModifiedBy(String value) { this.LastModifiedBy = value; return this; } - public String getOwnerId() { return OwnerId; } - public TechnologyBase setOwnerId(String value) { this.OwnerId = value; return this; } - public String getSlug() { return Slug; } - public TechnologyBase setSlug(String value) { this.Slug = value; return this; } - public Boolean isLogoApproved() { return LogoApproved; } - public TechnologyBase setLogoApproved(Boolean value) { this.LogoApproved = value; return this; } - public Boolean getIsLocked() { return IsLocked; } - public TechnologyBase setIsLocked(Boolean value) { this.IsLocked = value; return this; } - public TechnologyTier getTier() { return Tier; } - public TechnologyBase setTier(TechnologyTier value) { this.Tier = value; return this; } - public Date getLastStatusUpdate() { return LastStatusUpdate; } - public TechnologyBase setLastStatusUpdate(Date value) { this.LastStatusUpdate = value; return this; } + public Integer organizationId = null; + public String slug = null; + public String description = null; + public String color = null; + + public Integer getOrganizationId() { return organizationId; } + public UpdateOrganizationLabel setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getSlug() { return slug; } + public UpdateOrganizationLabel setSlug(String value) { this.slug = value; return this; } + public String getDescription() { return description; } + public UpdateOrganizationLabel setDescription(String value) { this.description = value; return this; } + public String getColor() { return color; } + public UpdateOrganizationLabel setColor(String value) { this.color = value; return this; } + private static Object responseType = OrganizationLabelResponse.class; + public Object getResponseType() { return responseType; } } - public static class TechnologyStackBase + @Route(Path="/orgs/{OrganizationId}/labels/{Slug}", Verbs="DELETE") + public static class RemoveOrganizationLabel implements IReturnVoid { - public Long Id = null; - public String Name = null; - public String VendorName = null; - public String Description = null; - public String AppUrl = null; - public String ScreenshotUrl = null; - public Date Created = null; - public String CreatedBy = null; - public Date LastModified = null; - public String LastModifiedBy = null; - public Boolean IsLocked = null; - public String OwnerId = null; - public String Slug = null; - public String Details = null; - public Date LastStatusUpdate = null; - - public Long getId() { return Id; } - public TechnologyStackBase setId(Long value) { this.Id = value; return this; } - public String getName() { return Name; } - public TechnologyStackBase setName(String value) { this.Name = value; return this; } - public String getVendorName() { return VendorName; } - public TechnologyStackBase setVendorName(String value) { this.VendorName = value; return this; } - public String getDescription() { return Description; } - public TechnologyStackBase setDescription(String value) { this.Description = value; return this; } - public String getAppUrl() { return AppUrl; } - public TechnologyStackBase setAppUrl(String value) { this.AppUrl = value; return this; } - public String getScreenshotUrl() { return ScreenshotUrl; } - public TechnologyStackBase setScreenshotUrl(String value) { this.ScreenshotUrl = value; return this; } - public Date getCreated() { return Created; } - public TechnologyStackBase setCreated(Date value) { this.Created = value; return this; } - public String getCreatedBy() { return CreatedBy; } - public TechnologyStackBase setCreatedBy(String value) { this.CreatedBy = value; return this; } - public Date getLastModified() { return LastModified; } - public TechnologyStackBase setLastModified(Date value) { this.LastModified = value; return this; } - public String getLastModifiedBy() { return LastModifiedBy; } - public TechnologyStackBase setLastModifiedBy(String value) { this.LastModifiedBy = value; return this; } - public Boolean getIsLocked() { return IsLocked; } - public TechnologyStackBase setIsLocked(Boolean value) { this.IsLocked = value; return this; } - public String getOwnerId() { return OwnerId; } - public TechnologyStackBase setOwnerId(String value) { this.OwnerId = value; return this; } - public String getSlug() { return Slug; } - public TechnologyStackBase setSlug(String value) { this.Slug = value; return this; } - public String getDetails() { return Details; } - public TechnologyStackBase setDetails(String value) { this.Details = value; return this; } - public Date getLastStatusUpdate() { return LastStatusUpdate; } - public TechnologyStackBase setLastStatusUpdate(Date value) { this.LastStatusUpdate = value; return this; } + public Integer organizationId = null; + public String slug = null; + + public Integer getOrganizationId() { return organizationId; } + public RemoveOrganizationLabel setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getSlug() { return slug; } + public RemoveOrganizationLabel setSlug(String value) { this.slug = value; return this; } } - public static class QueryBase + @Route(Path="/orgs/{OrganizationId}/categories", Verbs="POST") + public static class AddOrganizationCategory implements IReturn { - @DataMember(Order=1) - public Integer Skip = null; + public Integer organizationId = null; + public String slug = null; + public String name = null; + public String description = null; + public ArrayList technologyIds = null; - @DataMember(Order=2) - public Integer Take = null; + public Integer getOrganizationId() { return organizationId; } + public AddOrganizationCategory setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getSlug() { return slug; } + public AddOrganizationCategory setSlug(String value) { this.slug = value; return this; } + public String getName() { return name; } + public AddOrganizationCategory setName(String value) { this.name = value; return this; } + public String getDescription() { return description; } + public AddOrganizationCategory setDescription(String value) { this.description = value; return this; } + public ArrayList getTechnologyIds() { return technologyIds; } + public AddOrganizationCategory setTechnologyIds(ArrayList value) { this.technologyIds = value; return this; } + private static Object responseType = AddOrganizationCategoryResponse.class; + public Object getResponseType() { return responseType; } + } - @DataMember(Order=3) - public String OrderBy = null; + @Route(Path="/orgs/{OrganizationId}/categories/{Id}", Verbs="PUT") + public static class UpdateOrganizationCategory implements IReturn + { + public Integer organizationId = null; + public Integer id = null; + public String name = null; + public String slug = null; + public String description = null; + public ArrayList technologyIds = null; + + public Integer getOrganizationId() { return organizationId; } + public UpdateOrganizationCategory setOrganizationId(Integer value) { this.organizationId = value; return this; } + public Integer getId() { return id; } + public UpdateOrganizationCategory setId(Integer value) { this.id = value; return this; } + public String getName() { return name; } + public UpdateOrganizationCategory setName(String value) { this.name = value; return this; } + public String getSlug() { return slug; } + public UpdateOrganizationCategory setSlug(String value) { this.slug = value; return this; } + public String getDescription() { return description; } + public UpdateOrganizationCategory setDescription(String value) { this.description = value; return this; } + public ArrayList getTechnologyIds() { return technologyIds; } + public UpdateOrganizationCategory setTechnologyIds(ArrayList value) { this.technologyIds = value; return this; } + private static Object responseType = UpdateOrganizationCategoryResponse.class; + public Object getResponseType() { return responseType; } + } - @DataMember(Order=4) - public String OrderByDesc = null; - - public Integer getSkip() { return Skip; } - public QueryBase setSkip(Integer value) { this.Skip = value; return this; } - public Integer getTake() { return Take; } - public QueryBase setTake(Integer value) { this.Take = value; return this; } - public String getOrderBy() { return OrderBy; } - public QueryBase setOrderBy(String value) { this.OrderBy = value; return this; } - public String getOrderByDesc() { return OrderByDesc; } - public QueryBase setOrderByDesc(String value) { this.OrderByDesc = value; return this; } + @Route(Path="/orgs/{OrganizationId}/categories/{Id}", Verbs="DELETE") + public static class DeleteOrganizationCategory implements IReturnVoid + { + public Integer organizationId = null; + public Integer id = null; + + public Integer getOrganizationId() { return organizationId; } + public DeleteOrganizationCategory setOrganizationId(Integer value) { this.organizationId = value; return this; } + public Integer getId() { return id; } + public DeleteOrganizationCategory setId(Integer value) { this.id = value; return this; } + } + + @Route(Path="/orgs/{OrganizationId}/members", Verbs="POST") + public static class AddOrganizationMember implements IReturn + { + public Integer organizationId = null; + public String userName = null; + public Boolean isOwner = null; + public Boolean isModerator = null; + public Boolean denyPosts = null; + public Boolean denyComments = null; + public Boolean denyAll = null; + public String notes = null; + + public Integer getOrganizationId() { return organizationId; } + public AddOrganizationMember setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getUserName() { return userName; } + public AddOrganizationMember setUserName(String value) { this.userName = value; return this; } + public Boolean getIsOwner() { return isOwner; } + public AddOrganizationMember setIsOwner(Boolean value) { this.isOwner = value; return this; } + public Boolean getIsModerator() { return isModerator; } + public AddOrganizationMember setIsModerator(Boolean value) { this.isModerator = value; return this; } + public Boolean isDenyPosts() { return denyPosts; } + public AddOrganizationMember setDenyPosts(Boolean value) { this.denyPosts = value; return this; } + public Boolean isDenyComments() { return denyComments; } + public AddOrganizationMember setDenyComments(Boolean value) { this.denyComments = value; return this; } + public Boolean isDenyAll() { return denyAll; } + public AddOrganizationMember setDenyAll(Boolean value) { this.denyAll = value; return this; } + public String getNotes() { return notes; } + public AddOrganizationMember setNotes(String value) { this.notes = value; return this; } + private static Object responseType = AddOrganizationMemberResponse.class; + public Object getResponseType() { return responseType; } } - public static class TechnologyInStack extends TechnologyBase - { - public Long TechnologyId = null; - public Long TechnologyStackId = null; - public String Justification = null; - - public Long getTechnologyId() { return TechnologyId; } - public TechnologyInStack setTechnologyId(Long value) { this.TechnologyId = value; return this; } - public Long getTechnologyStackId() { return TechnologyStackId; } - public TechnologyInStack setTechnologyStackId(Long value) { this.TechnologyStackId = value; return this; } - public String getJustification() { return Justification; } - public TechnologyInStack setJustification(String value) { this.Justification = value; return this; } + @Route(Path="/orgs/{OrganizationId}/members/{Id}", Verbs="PUT") + public static class UpdateOrganizationMember implements IReturn + { + public Integer organizationId = null; + public Integer userId = null; + public Boolean isOwner = null; + public Boolean isModerator = null; + public Boolean denyPosts = null; + public Boolean denyComments = null; + public Boolean denyAll = null; + public String notes = null; + + public Integer getOrganizationId() { return organizationId; } + public UpdateOrganizationMember setOrganizationId(Integer value) { this.organizationId = value; return this; } + public Integer getUserId() { return userId; } + public UpdateOrganizationMember setUserId(Integer value) { this.userId = value; return this; } + public Boolean getIsOwner() { return isOwner; } + public UpdateOrganizationMember setIsOwner(Boolean value) { this.isOwner = value; return this; } + public Boolean getIsModerator() { return isModerator; } + public UpdateOrganizationMember setIsModerator(Boolean value) { this.isModerator = value; return this; } + public Boolean isDenyPosts() { return denyPosts; } + public UpdateOrganizationMember setDenyPosts(Boolean value) { this.denyPosts = value; return this; } + public Boolean isDenyComments() { return denyComments; } + public UpdateOrganizationMember setDenyComments(Boolean value) { this.denyComments = value; return this; } + public Boolean isDenyAll() { return denyAll; } + public UpdateOrganizationMember setDenyAll(Boolean value) { this.denyAll = value; return this; } + public String getNotes() { return notes; } + public UpdateOrganizationMember setNotes(String value) { this.notes = value; return this; } + private static Object responseType = UpdateOrganizationMemberResponse.class; + public Object getResponseType() { return responseType; } } - public static class PostComment - { - public Integer Id = null; - public Integer PostId = null; - public String UserId = null; - public String UserName = null; - public String Date = null; - public String ShortDate = null; - public String TextHtml = null; - - public Integer getId() { return Id; } - public PostComment setId(Integer value) { this.Id = value; return this; } - public Integer getPostId() { return PostId; } - public PostComment setPostId(Integer value) { this.PostId = value; return this; } - public String getUserId() { return UserId; } - public PostComment setUserId(String value) { this.UserId = value; return this; } - public String getUserName() { return UserName; } - public PostComment setUserName(String value) { this.UserName = value; return this; } - public String getDate() { return Date; } - public PostComment setDate(String value) { this.Date = value; return this; } - public String getShortDate() { return ShortDate; } - public PostComment setShortDate(String value) { this.ShortDate = value; return this; } - public String getTextHtml() { return TextHtml; } - public PostComment setTextHtml(String value) { this.TextHtml = value; return this; } + @Route(Path="/orgs/{OrganizationId}/members/{UserId}", Verbs="DELETE") + public static class RemoveOrganizationMember implements IReturnVoid + { + public Integer organizationId = null; + public Integer userId = null; + + public Integer getOrganizationId() { return organizationId; } + public RemoveOrganizationMember setOrganizationId(Integer value) { this.organizationId = value; return this; } + public Integer getUserId() { return userId; } + public RemoveOrganizationMember setUserId(Integer value) { this.userId = value; return this; } + } + + @Route(Path="/orgs/{OrganizationId}/members/set", Verbs="POST") + public static class SetOrganizationMembers implements IReturn + { + public Integer organizationId = null; + public ArrayList githubUserNames = null; + public ArrayList twitterUserNames = null; + public ArrayList emails = null; + public Boolean removeUnspecifiedMembers = null; + public Boolean isOwner = null; + public Boolean isModerator = null; + public Boolean denyPosts = null; + public Boolean denyComments = null; + public Boolean denyAll = null; + + public Integer getOrganizationId() { return organizationId; } + public SetOrganizationMembers setOrganizationId(Integer value) { this.organizationId = value; return this; } + public ArrayList getGithubUserNames() { return githubUserNames; } + public SetOrganizationMembers setGithubUserNames(ArrayList value) { this.githubUserNames = value; return this; } + public ArrayList getTwitterUserNames() { return twitterUserNames; } + public SetOrganizationMembers setTwitterUserNames(ArrayList value) { this.twitterUserNames = value; return this; } + public ArrayList getEmails() { return emails; } + public SetOrganizationMembers setEmails(ArrayList value) { this.emails = value; return this; } + public Boolean isRemoveUnspecifiedMembers() { return removeUnspecifiedMembers; } + public SetOrganizationMembers setRemoveUnspecifiedMembers(Boolean value) { this.removeUnspecifiedMembers = value; return this; } + public Boolean getIsOwner() { return isOwner; } + public SetOrganizationMembers setIsOwner(Boolean value) { this.isOwner = value; return this; } + public Boolean getIsModerator() { return isModerator; } + public SetOrganizationMembers setIsModerator(Boolean value) { this.isModerator = value; return this; } + public Boolean isDenyPosts() { return denyPosts; } + public SetOrganizationMembers setDenyPosts(Boolean value) { this.denyPosts = value; return this; } + public Boolean isDenyComments() { return denyComments; } + public SetOrganizationMembers setDenyComments(Boolean value) { this.denyComments = value; return this; } + public Boolean isDenyAll() { return denyAll; } + public SetOrganizationMembers setDenyAll(Boolean value) { this.denyAll = value; return this; } + private static Object responseType = SetOrganizationMembersResponse.class; + public Object getResponseType() { return responseType; } } - public static class LogoUrlApprovalResponse + @Route(Path="/orgs/{OrganizationId}/invites", Verbs="GET") + public static class GetOrganizationMemberInvites implements IReturn { - public Technology Result = null; - - public Technology getResult() { return Result; } - public LogoUrlApprovalResponse setResult(Technology value) { this.Result = value; return this; } + public Integer organizationId = null; + + public Integer getOrganizationId() { return organizationId; } + public GetOrganizationMemberInvites setOrganizationId(Integer value) { this.organizationId = value; return this; } + private static Object responseType = GetOrganizationMemberInvitesResponse.class; + public Object getResponseType() { return responseType; } } - public static class LockStackResponse + @Route(Path="/orgs/{OrganizationId}/invites", Verbs="POST") + public static class RequestOrganizationMemberInvite implements IReturn { - + public Integer organizationId = null; + + public Integer getOrganizationId() { return organizationId; } + public RequestOrganizationMemberInvite setOrganizationId(Integer value) { this.organizationId = value; return this; } + private static Object responseType = RequestOrganizationMemberInviteResponse.class; + public Object getResponseType() { return responseType; } } - public static class CreateTechnologyResponse + @Route(Path="/orgs/{OrganizationId}/invites/{UserId}", Verbs="PUT") + public static class UpdateOrganizationMemberInvite implements IReturn { - public Technology Result = null; - public ResponseStatus ResponseStatus = null; - - public Technology getResult() { return Result; } - public CreateTechnologyResponse setResult(Technology value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public CreateTechnologyResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Integer organizationId = null; + public String userName = null; + public Boolean approve = null; + public Boolean dismiss = null; + + public Integer getOrganizationId() { return organizationId; } + public UpdateOrganizationMemberInvite setOrganizationId(Integer value) { this.organizationId = value; return this; } + public String getUserName() { return userName; } + public UpdateOrganizationMemberInvite setUserName(String value) { this.userName = value; return this; } + public Boolean isApprove() { return approve; } + public UpdateOrganizationMemberInvite setApprove(Boolean value) { this.approve = value; return this; } + public Boolean isDismiss() { return dismiss; } + public UpdateOrganizationMemberInvite setDismiss(Boolean value) { this.dismiss = value; return this; } + private static Object responseType = UpdateOrganizationMemberInviteResponse.class; + public Object getResponseType() { return responseType; } } - public static class UpdateTechnologyResponse - { - public Technology Result = null; - public ResponseStatus ResponseStatus = null; - - public Technology getResult() { return Result; } - public UpdateTechnologyResponse setResult(Technology value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public UpdateTechnologyResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + @Route(Path="/posts", Verbs="GET") + public static class QueryPosts extends QueryDb implements IReturn> + { + public ArrayList ids = null; + public Integer organizationId = null; + public ArrayList organizationIds = null; + public ArrayList types = null; + public ArrayList anyTechnologyIds = null; + public ArrayList is = null; + + public ArrayList getIds() { return ids; } + public QueryPosts setIds(ArrayList value) { this.ids = value; return this; } + public Integer getOrganizationId() { return organizationId; } + public QueryPosts setOrganizationId(Integer value) { this.organizationId = value; return this; } + public ArrayList getOrganizationIds() { return organizationIds; } + public QueryPosts setOrganizationIds(ArrayList value) { this.organizationIds = value; return this; } + public ArrayList getTypes() { return types; } + public QueryPosts setTypes(ArrayList value) { this.types = value; return this; } + public ArrayList getAnyTechnologyIds() { return anyTechnologyIds; } + public QueryPosts setAnyTechnologyIds(ArrayList value) { this.anyTechnologyIds = value; return this; } + public ArrayList getIs() { return is; } + public QueryPosts setIs(ArrayList value) { this.is = value; return this; } + private static Object responseType = new TypeToken>(){}.getType(); + public Object getResponseType() { return responseType; } } - public static class DeleteTechnologyResponse + @Route(Path="/posts/{Id}", Verbs="GET") + public static class GetPost implements IReturn { - public Technology Result = null; - public ResponseStatus ResponseStatus = null; - - public Technology getResult() { return Result; } - public DeleteTechnologyResponse setResult(Technology value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public DeleteTechnologyResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long id = null; + public String include = null; + + public Long getId() { return id; } + public GetPost setId(Long value) { this.id = value; return this; } + public String getInclude() { return include; } + public GetPost setInclude(String value) { this.include = value; return this; } + private static Object responseType = GetPostResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetTechnologyResponse - { - public Date Created = null; - public Technology Technology = null; - public ArrayList TechnologyStacks = null; - public ResponseStatus ResponseStatus = null; - - public Date getCreated() { return Created; } - public GetTechnologyResponse setCreated(Date value) { this.Created = value; return this; } - public Technology getTechnology() { return Technology; } - public GetTechnologyResponse setTechnology(Technology value) { this.Technology = value; return this; } - public ArrayList getTechnologyStacks() { return TechnologyStacks; } - public GetTechnologyResponse setTechnologyStacks(ArrayList value) { this.TechnologyStacks = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public GetTechnologyResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + @Route(Path="/posts", Verbs="POST") + public static class CreatePost implements IReturn + { + public Integer organizationId = null; + public PostType type = null; + public Integer categoryId = null; + public String title = null; + public String url = null; + public String imageUrl = null; + public String content = null; + public Boolean lock = null; + public ArrayList technologyIds = null; + public ArrayList labels = null; + public Date fromDate = null; + public Date toDate = null; + public String metaType = null; + public String meta = null; + public Long refId = null; + public String refSource = null; + public String refUrn = null; + + public Integer getOrganizationId() { return organizationId; } + public CreatePost setOrganizationId(Integer value) { this.organizationId = value; return this; } + public PostType getType() { return type; } + public CreatePost setType(PostType value) { this.type = value; return this; } + public Integer getCategoryId() { return categoryId; } + public CreatePost setCategoryId(Integer value) { this.categoryId = value; return this; } + public String getTitle() { return title; } + public CreatePost setTitle(String value) { this.title = value; return this; } + public String getUrl() { return url; } + public CreatePost setUrl(String value) { this.url = value; return this; } + public String getImageUrl() { return imageUrl; } + public CreatePost setImageUrl(String value) { this.imageUrl = value; return this; } + public String getContent() { return content; } + public CreatePost setContent(String value) { this.content = value; return this; } + public Boolean isLock() { return lock; } + public CreatePost setLock(Boolean value) { this.lock = value; return this; } + public ArrayList getTechnologyIds() { return technologyIds; } + public CreatePost setTechnologyIds(ArrayList value) { this.technologyIds = value; return this; } + public ArrayList getLabels() { return labels; } + public CreatePost setLabels(ArrayList value) { this.labels = value; return this; } + public Date getFromDate() { return fromDate; } + public CreatePost setFromDate(Date value) { this.fromDate = value; return this; } + public Date getToDate() { return toDate; } + public CreatePost setToDate(Date value) { this.toDate = value; return this; } + public String getMetaType() { return metaType; } + public CreatePost setMetaType(String value) { this.metaType = value; return this; } + public String getMeta() { return meta; } + public CreatePost setMeta(String value) { this.meta = value; return this; } + public Long getRefId() { return refId; } + public CreatePost setRefId(Long value) { this.refId = value; return this; } + public String getRefSource() { return refSource; } + public CreatePost setRefSource(String value) { this.refSource = value; return this; } + public String getRefUrn() { return refUrn; } + public CreatePost setRefUrn(String value) { this.refUrn = value; return this; } + private static Object responseType = CreatePostResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetTechnologyPreviousVersionsResponse - { - public ArrayList Results = null; - - public ArrayList getResults() { return Results; } - public GetTechnologyPreviousVersionsResponse setResults(ArrayList value) { this.Results = value; return this; } + @Route(Path="/posts/{Id}", Verbs="PUT") + public static class UpdatePost implements IReturn + { + public Long id = null; + public Integer organizationId = null; + public PostType type = null; + public Integer categoryId = null; + public String title = null; + public String url = null; + public String imageUrl = null; + public String content = null; + public Boolean lock = null; + public ArrayList technologyIds = null; + public ArrayList labels = null; + public Date fromDate = null; + public Date toDate = null; + public String metaType = null; + public String meta = null; + + public Long getId() { return id; } + public UpdatePost setId(Long value) { this.id = value; return this; } + public Integer getOrganizationId() { return organizationId; } + public UpdatePost setOrganizationId(Integer value) { this.organizationId = value; return this; } + public PostType getType() { return type; } + public UpdatePost setType(PostType value) { this.type = value; return this; } + public Integer getCategoryId() { return categoryId; } + public UpdatePost setCategoryId(Integer value) { this.categoryId = value; return this; } + public String getTitle() { return title; } + public UpdatePost setTitle(String value) { this.title = value; return this; } + public String getUrl() { return url; } + public UpdatePost setUrl(String value) { this.url = value; return this; } + public String getImageUrl() { return imageUrl; } + public UpdatePost setImageUrl(String value) { this.imageUrl = value; return this; } + public String getContent() { return content; } + public UpdatePost setContent(String value) { this.content = value; return this; } + public Boolean isLock() { return lock; } + public UpdatePost setLock(Boolean value) { this.lock = value; return this; } + public ArrayList getTechnologyIds() { return technologyIds; } + public UpdatePost setTechnologyIds(ArrayList value) { this.technologyIds = value; return this; } + public ArrayList getLabels() { return labels; } + public UpdatePost setLabels(ArrayList value) { this.labels = value; return this; } + public Date getFromDate() { return fromDate; } + public UpdatePost setFromDate(Date value) { this.fromDate = value; return this; } + public Date getToDate() { return toDate; } + public UpdatePost setToDate(Date value) { this.toDate = value; return this; } + public String getMetaType() { return metaType; } + public UpdatePost setMetaType(String value) { this.metaType = value; return this; } + public String getMeta() { return meta; } + public UpdatePost setMeta(String value) { this.meta = value; return this; } + private static Object responseType = UpdatePostResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetTechnologyFavoriteDetailsResponse + @Route(Path="/posts/{Id}", Verbs="DELETE") + public static class DeletePost implements IReturn { - public ArrayList Users = null; - public Integer FavoriteCount = null; - - public ArrayList getUsers() { return Users; } - public GetTechnologyFavoriteDetailsResponse setUsers(ArrayList value) { this.Users = value; return this; } - public Integer getFavoriteCount() { return FavoriteCount; } - public GetTechnologyFavoriteDetailsResponse setFavoriteCount(Integer value) { this.FavoriteCount = value; return this; } + public Long id = null; + + public Long getId() { return id; } + public DeletePost setId(Long value) { this.id = value; return this; } + private static Object responseType = DeletePostResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetAllTechnologiesResponse + @Route(Path="/posts/{Id}/lock", Verbs="PUT") + public static class LockPost implements IReturnVoid { - public ArrayList Results = null; - - public ArrayList getResults() { return Results; } - public GetAllTechnologiesResponse setResults(ArrayList value) { this.Results = value; return this; } + public Long id = null; + public Boolean lock = null; + public String reason = null; + + public Long getId() { return id; } + public LockPost setId(Long value) { this.id = value; return this; } + public Boolean isLock() { return lock; } + public LockPost setLock(Boolean value) { this.lock = value; return this; } + public String getReason() { return reason; } + public LockPost setReason(String value) { this.reason = value; return this; } } - @DataContract - public static class QueryResponse + @Route(Path="/posts/{Id}/hide", Verbs="PUT") + public static class HidePost implements IReturnVoid { - @DataMember(Order=1) - public Integer Offset = null; + public Long id = null; + public Boolean hide = null; + public String reason = null; - @DataMember(Order=2) - public Integer Total = null; - - @DataMember(Order=3) - public ArrayList Results = null; + public Long getId() { return id; } + public HidePost setId(Long value) { this.id = value; return this; } + public Boolean isHide() { return hide; } + public HidePost setHide(Boolean value) { this.hide = value; return this; } + public String getReason() { return reason; } + public HidePost setReason(String value) { this.reason = value; return this; } + } - @DataMember(Order=4) - public HashMap Meta = null; + @Route(Path="/posts/{Id}/status/{Status}", Verbs="PUT") + public static class ChangeStatusPost implements IReturnVoid + { + public Long id = null; + public String status = null; + public String reason = null; - @DataMember(Order=5) - public ResponseStatus ResponseStatus = null; - - public Integer getOffset() { return Offset; } - public QueryResponse setOffset(Integer value) { this.Offset = value; return this; } - public Integer getTotal() { return Total; } - public QueryResponse setTotal(Integer value) { this.Total = value; return this; } - public ArrayList getResults() { return Results; } - public QueryResponse setResults(ArrayList value) { this.Results = value; return this; } - public HashMap getMeta() { return Meta; } - public QueryResponse setMeta(HashMap value) { this.Meta = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public QueryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long getId() { return id; } + public ChangeStatusPost setId(Long value) { this.id = value; return this; } + public String getStatus() { return status; } + public ChangeStatusPost setStatus(String value) { this.status = value; return this; } + public String getReason() { return reason; } + public ChangeStatusPost setReason(String value) { this.reason = value; return this; } } - public static class CreateTechnologyStackResponse + @Route(Path="/posts/{PostId}/report/{Id}", Verbs="POST") + public static class ActionPostReport implements IReturnVoid { - public TechStackDetails Result = null; - public ResponseStatus ResponseStatus = null; - - public TechStackDetails getResult() { return Result; } - public CreateTechnologyStackResponse setResult(TechStackDetails value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public CreateTechnologyStackResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long postId = null; + public Long id = null; + public ReportAction reportAction = null; + + public Long getPostId() { return postId; } + public ActionPostReport setPostId(Long value) { this.postId = value; return this; } + public Long getId() { return id; } + public ActionPostReport setId(Long value) { this.id = value; return this; } + public ReportAction getReportAction() { return reportAction; } + public ActionPostReport setReportAction(ReportAction value) { this.reportAction = value; return this; } } - public static class UpdateTechnologyStackResponse + @Route(Path="/posts/{PostId}/comments", Verbs="POST") + public static class CreatePostComment implements IReturn { - public TechStackDetails Result = null; - public ResponseStatus ResponseStatus = null; - - public TechStackDetails getResult() { return Result; } - public UpdateTechnologyStackResponse setResult(TechStackDetails value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public UpdateTechnologyStackResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long postId = null; + public Long replyId = null; + public String content = null; + + public Long getPostId() { return postId; } + public CreatePostComment setPostId(Long value) { this.postId = value; return this; } + public Long getReplyId() { return replyId; } + public CreatePostComment setReplyId(Long value) { this.replyId = value; return this; } + public String getContent() { return content; } + public CreatePostComment setContent(String value) { this.content = value; return this; } + private static Object responseType = CreatePostCommentResponse.class; + public Object getResponseType() { return responseType; } } - public static class DeleteTechnologyStackResponse + @Route(Path="/posts/{PostId}/comments/{Id}", Verbs="PUT") + public static class UpdatePostComment implements IReturn { - public TechStackDetails Result = null; - public ResponseStatus ResponseStatus = null; - - public TechStackDetails getResult() { return Result; } - public DeleteTechnologyStackResponse setResult(TechStackDetails value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public DeleteTechnologyStackResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long id = null; + public Long postId = null; + public String content = null; + + public Long getId() { return id; } + public UpdatePostComment setId(Long value) { this.id = value; return this; } + public Long getPostId() { return postId; } + public UpdatePostComment setPostId(Long value) { this.postId = value; return this; } + public String getContent() { return content; } + public UpdatePostComment setContent(String value) { this.content = value; return this; } + private static Object responseType = UpdatePostCommentResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetAllTechnologyStacksResponse + @Route(Path="/posts/{PostId}/comments/{Id}", Verbs="DELETE") + public static class DeletePostComment implements IReturn { - public ArrayList Results = null; - - public ArrayList getResults() { return Results; } - public GetAllTechnologyStacksResponse setResults(ArrayList value) { this.Results = value; return this; } + public Long id = null; + public Long postId = null; + + public Long getId() { return id; } + public DeletePostComment setId(Long value) { this.id = value; return this; } + public Long getPostId() { return postId; } + public DeletePostComment setPostId(Long value) { this.postId = value; return this; } + private static Object responseType = DeletePostCommentResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetTechnologyStackResponse + @Route(Path="/posts/{PostId}/comments/{PostCommentId}/report/{Id}", Verbs="POST") + public static class ActionPostCommentReport implements IReturnVoid { - public Date Created = null; - public TechStackDetails Result = null; - public ResponseStatus ResponseStatus = null; - - public Date getCreated() { return Created; } - public GetTechnologyStackResponse setCreated(Date value) { this.Created = value; return this; } - public TechStackDetails getResult() { return Result; } - public GetTechnologyStackResponse setResult(TechStackDetails value) { this.Result = value; return this; } - public ResponseStatus getResponseStatus() { return ResponseStatus; } - public GetTechnologyStackResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } + public Long id = null; + public Long postCommentId = null; + public Long postId = null; + public ReportAction reportAction = null; + + public Long getId() { return id; } + public ActionPostCommentReport setId(Long value) { this.id = value; return this; } + public Long getPostCommentId() { return postCommentId; } + public ActionPostCommentReport setPostCommentId(Long value) { this.postCommentId = value; return this; } + public Long getPostId() { return postId; } + public ActionPostCommentReport setPostId(Long value) { this.postId = value; return this; } + public ReportAction getReportAction() { return reportAction; } + public ActionPostCommentReport setReportAction(ReportAction value) { this.reportAction = value; return this; } } - public static class GetTechnologyStackPreviousVersionsResponse + @Route("/user/comments/votes") + public static class GetUserPostCommentVotes implements IReturn { - public ArrayList Results = null; - - public ArrayList getResults() { return Results; } - public GetTechnologyStackPreviousVersionsResponse setResults(ArrayList value) { this.Results = value; return this; } + public Long postId = null; + + public Long getPostId() { return postId; } + public GetUserPostCommentVotes setPostId(Long value) { this.postId = value; return this; } + private static Object responseType = GetUserPostCommentVotesResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetTechnologyStackFavoriteDetailsResponse + @Route(Path="/posts/{PostId}/comments/{Id}/pin", Verbs="UPDATE") + public static class PinPostComment implements IReturn { - public ArrayList Users = null; - public Integer FavoriteCount = null; - - public ArrayList getUsers() { return Users; } - public GetTechnologyStackFavoriteDetailsResponse setUsers(ArrayList value) { this.Users = value; return this; } - public Integer getFavoriteCount() { return FavoriteCount; } - public GetTechnologyStackFavoriteDetailsResponse setFavoriteCount(Integer value) { this.FavoriteCount = value; return this; } + public Long id = null; + public Long postId = null; + public Boolean pin = null; + + public Long getId() { return id; } + public PinPostComment setId(Long value) { this.id = value; return this; } + public Long getPostId() { return postId; } + public PinPostComment setPostId(Long value) { this.postId = value; return this; } + public Boolean isPin() { return pin; } + public PinPostComment setPin(Boolean value) { this.pin = value; return this; } + private static Object responseType = PinPostCommentResponse.class; + public Object getResponseType() { return responseType; } } - public static class GetConfigResponse + @Route("/users/by-email") + public static class GetUsersByEmails implements IReturn { - public ArrayList