@@ -1082,6 +1082,7 @@ def test_from_api_repr_w_name(self):
10821082 def test_from_api_repr_wo_name (self ):
10831083 RESOURCE = {
10841084 'parameterType' : {
1085+ 'type' : 'ARRAY' ,
10851086 'arrayType' : 'INT64' ,
10861087 },
10871088 'parameterValue' : {
@@ -1098,6 +1099,7 @@ def test_to_api_repr_w_name(self):
10981099 EXPECTED = {
10991100 'name' : 'foo' ,
11001101 'parameterType' : {
1102+ 'type' : 'ARRAY' ,
11011103 'arrayType' : 'INT64' ,
11021104 },
11031105 'parameterValue' : {
@@ -1110,6 +1112,7 @@ def test_to_api_repr_w_name(self):
11101112 def test_to_api_repr_wo_name (self ):
11111113 EXPECTED = {
11121114 'parameterType' : {
1115+ 'type' : 'ARRAY' ,
11131116 'arrayType' : 'INT64' ,
11141117 },
11151118 'parameterValue' : {
@@ -1123,6 +1126,7 @@ def test_to_api_repr_wo_name(self):
11231126 def test_to_api_repr_w_unknown_type (self ):
11241127 EXPECTED = {
11251128 'parameterType' : {
1129+ 'type' : 'ARRAY' ,
11261130 'arrayType' : 'UNKNOWN' ,
11271131 },
11281132 'parameterValue' : {
@@ -1170,13 +1174,17 @@ def test_from_api_repr_w_name(self):
11701174 RESOURCE = {
11711175 'name' : 'foo' ,
11721176 'parameterType' : {
1177+ 'type' : 'STRUCT' ,
11731178 'structTypes' : [
1174- {'name' : 'bar' , 'type' : ' INT64' },
1175- {'name' : 'baz' , 'type' : ' STRING' },
1179+ {'name' : 'bar' , 'type' : { 'type' : ' INT64'} },
1180+ {'name' : 'baz' , 'type' : { 'type' : ' STRING'} },
11761181 ],
11771182 },
11781183 'parameterValue' : {
1179- 'structValues' : {'bar' : 123 , 'baz' : 'abc' },
1184+ 'structValues' : {
1185+ 'bar' : {'value' : 123 },
1186+ 'baz' : {'value' : 'abc' },
1187+ },
11801188 },
11811189 }
11821190 klass = self ._get_target_class ()
@@ -1188,13 +1196,17 @@ def test_from_api_repr_w_name(self):
11881196 def test_from_api_repr_wo_name (self ):
11891197 RESOURCE = {
11901198 'parameterType' : {
1199+ 'type' : 'STRUCT' ,
11911200 'structTypes' : [
1192- {'name' : 'bar' , 'type' : ' INT64' },
1193- {'name' : 'baz' , 'type' : ' STRING' },
1201+ {'name' : 'bar' , 'type' : { 'type' : ' INT64'} },
1202+ {'name' : 'baz' , 'type' : { 'type' : ' STRING'} },
11941203 ],
11951204 },
11961205 'parameterValue' : {
1197- 'structValues' : {'bar' : 123 , 'baz' : 'abc' },
1206+ 'structValues' : {
1207+ 'bar' : {'value' : 123 },
1208+ 'baz' : {'value' : 'abc' },
1209+ },
11981210 },
11991211 }
12001212 klass = self ._get_target_class ()
@@ -1207,13 +1219,17 @@ def test_to_api_repr_w_name(self):
12071219 EXPECTED = {
12081220 'name' : 'foo' ,
12091221 'parameterType' : {
1222+ 'type' : 'STRUCT' ,
12101223 'structTypes' : [
1211- {'name' : 'bar' , 'type' : ' INT64' },
1212- {'name' : 'baz' , 'type' : ' STRING' },
1224+ {'name' : 'bar' , 'type' : { 'type' : ' INT64'} },
1225+ {'name' : 'baz' , 'type' : { 'type' : ' STRING'} },
12131226 ],
12141227 },
12151228 'parameterValue' : {
1216- 'structValues' : {'bar' : '123' , 'baz' : 'abc' },
1229+ 'structValues' : {
1230+ 'bar' : {'value' : '123' },
1231+ 'baz' : {'value' : 'abc' },
1232+ },
12171233 },
12181234 }
12191235 sub_1 = self ._make_subparam ('bar' , 'INT64' , 123 )
@@ -1224,13 +1240,17 @@ def test_to_api_repr_w_name(self):
12241240 def test_to_api_repr_wo_name (self ):
12251241 EXPECTED = {
12261242 'parameterType' : {
1243+ 'type' : 'STRUCT' ,
12271244 'structTypes' : [
1228- {'name' : 'bar' , 'type' : ' INT64' },
1229- {'name' : 'baz' , 'type' : ' STRING' },
1245+ {'name' : 'bar' , 'type' : { 'type' : ' INT64'} },
1246+ {'name' : 'baz' , 'type' : { 'type' : ' STRING'} },
12301247 ],
12311248 },
12321249 'parameterValue' : {
1233- 'structValues' : {'bar' : '123' , 'baz' : 'abc' },
1250+ 'structValues' : {
1251+ 'bar' : {'value' : '123' },
1252+ 'baz' : {'value' : 'abc' },
1253+ },
12341254 },
12351255 }
12361256 sub_1 = self ._make_subparam ('bar' , 'INT64' , 123 )
0 commit comments