@@ -50,7 +50,9 @@ class Options:
5050 service_yaml_config : Dict [str , Any ] = dataclasses .field (default_factory = dict )
5151 rest_numeric_enums : bool = False
5252 proto_plus_deps : Tuple [str , ...] = dataclasses .field (default = ("" ,))
53+ non_default_versions : Tuple [str , ...] = dataclasses .field (default = ("" ,))
5354 api_description : str = ""
55+ default_version : str = ""
5456 documentation_name : str = ""
5557 documentation_uri : str = ""
5658 release_level : str = ""
@@ -75,6 +77,7 @@ class Options:
7577 "rest-numeric-enums" ,
7678 # proto plus dependencies delineated by '+'
7779 # For example, 'google.cloud.api.v1+google.cloud.anotherapi.v2'
80+ "non-default-versions" ,
7881 "proto-plus-deps" ,
7982 "release-level" , # One of ["preview", "stable"]
8083 "documentation-name" ,
@@ -187,6 +190,10 @@ def tweak_path(p):
187190 if old_naming :
188191 autogen_snippets = False
189192
193+ non_default_versions = tuple (opts .pop ("non-default-versions" , "" ))
194+ if len (non_default_versions ):
195+ non_default_versions = tuple (non_default_versions [0 ].split ("+" ))
196+
190197 proto_plus_deps = tuple (opts .pop ("proto-plus-deps" , "" ))
191198 if len (proto_plus_deps ):
192199 proto_plus_deps = tuple (proto_plus_deps [0 ].split ("+" ))
@@ -211,14 +218,16 @@ def tweak_path(p):
211218 transport = opts .pop ("transport" , ["grpc" ])[0 ].split ("+" ),
212219 service_yaml_config = service_yaml_config ,
213220 rest_numeric_enums = bool (opts .pop ("rest-numeric-enums" , False )),
214- title = service_yaml_config .get ("title" , "" ),
221+ non_default_versions = non_default_versions ,
222+ default_version = opts .pop ("default-version" , ["" ]).pop (),
215223 documentation_name = opts .pop ("documentation-name" , ["" ]).pop (),
216224 documentation_uri = documentation_uri ,
217225 api_description = api_description ,
218226 proto_plus_deps = proto_plus_deps ,
219227 release_level = opts .pop (
220228 "release-level" , ["preview" ]
221229 ).pop (), # Default to "preview" unless explicitly set to "stable"
230+ title = service_yaml_config .get ("title" , "" ),
222231 )
223232
224233 # Note: if we ever need to recursively check directories for sample
0 commit comments