Search in sources :

Example 41 with Model

use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_03.

@Test
public void testSerialization_03() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    model.getStrings().add("Foo");
    model.getStrings().add("Bar");
    model.getStrings().add("Zonk");
    String serialized = getSerializer().serialize(model);
    assertEquals("{ \"Foo\" } { \"Bar\" } { \"Zonk\" }", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 42 with Model

use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_07.

@Test
public void testSerialization_07() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
    model.setSubModel(subModel);
    subModel.getStrings().add("s1");
    String serialized = getSerializer().serialize(model);
    assertEquals("subModel 1 2 \"s1\"", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 43 with Model

use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_05.

@Test
public void testSerialization_05() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    model.getStrings().add("Unused");
    model.getKeys().add("Key1");
    model.getValues().add("Value1");
    model.getKeys().add("Key2");
    model.getValues().add("Value2");
    String serialized = getSerializer().serialize(model);
    assertEquals("{ \"Unused\" } [ \"Key1\" \"Value1\" \"Key2\" \"Value2\" ]", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 44 with Model

use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_06.

@Test
public void testSerialization_06() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
    model.setSubModel(subModel);
    String serialized = getSerializer().serialize(model);
    assertEquals("subModel", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 45 with Model

use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_02.

@Test
public void testSerialization_02() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    model.getStrings().add("Foo");
    String serialized = getSerializer().serialize(model);
    assertEquals("{ \"Foo\" }", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)52 Model (org.eclipse.xtext.valueconverter.bug250313.Model)30 LocationName (com.google.cloud.aiplatform.v1.LocationName)17 ModelServiceClient (com.google.cloud.aiplatform.v1.ModelServiceClient)17 ModelServiceSettings (com.google.cloud.aiplatform.v1.ModelServiceSettings)17 Model (com.google.cloud.aiplatform.v1.Model)16 AutoMlClient (com.google.cloud.automl.v1.AutoMlClient)16 Model (com.google.cloud.automl.v1.Model)16 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)16 PipelineServiceClient (com.google.cloud.aiplatform.v1.PipelineServiceClient)14 PipelineServiceSettings (com.google.cloud.aiplatform.v1.PipelineServiceSettings)14 TrainingPipeline (com.google.cloud.aiplatform.v1.TrainingPipeline)14 Value (com.google.protobuf.Value)14 InputDataConfig (com.google.cloud.aiplatform.v1.InputDataConfig)13 ModelContainerSpec (com.google.cloud.aiplatform.v1.ModelContainerSpec)13 ArrayList (java.util.ArrayList)12 EndpointName (com.google.cloud.aiplatform.v1.EndpointName)11 FilterSplit (com.google.cloud.aiplatform.v1.FilterSplit)11 FractionSplit (com.google.cloud.aiplatform.v1.FractionSplit)11 PredefinedSplit (com.google.cloud.aiplatform.v1.PredefinedSplit)11