@@ -27,10 +27,11 @@ class VariableManager(CRUDMixin[Variable]):
2727 _path = "/admin/ci/variables"
2828 _obj_cls = Variable
2929 _create_attrs = RequiredOptional (
30- required = ("key" , "value" ), optional = ("protected" , "variable_type" , "masked" )
30+ required = ("key" , "value" ),
31+ optional = ("protected" , "variable_type" , "masked" , "masked_and_hidden" ),
3132 )
3233 _update_attrs = RequiredOptional (
33- required = ("key" , "value" ), optional = ("protected" , "variable_type" , "masked" )
34+ required = ("key" ,), optional = ("value" , "protected" , "variable_type" , "masked" )
3435 )
3536
3637
@@ -43,10 +44,11 @@ class GroupVariableManager(CRUDMixin[GroupVariable]):
4344 _obj_cls = GroupVariable
4445 _from_parent_attrs = {"group_id" : "id" }
4546 _create_attrs = RequiredOptional (
46- required = ("key" , "value" ), optional = ("protected" , "variable_type" , "masked" )
47+ required = ("key" , "value" ),
48+ optional = ("protected" , "variable_type" , "masked" , "masked_and_hidden" ),
4749 )
4850 _update_attrs = RequiredOptional (
49- required = ("key" , "value" ), optional = ("protected" , "variable_type" , "masked" )
51+ required = ("key" ,), optional = ("value" , "protected" , "variable_type" , "masked" )
5052 )
5153
5254
@@ -60,9 +62,15 @@ class ProjectVariableManager(CRUDMixin[ProjectVariable]):
6062 _from_parent_attrs = {"project_id" : "id" }
6163 _create_attrs = RequiredOptional (
6264 required = ("key" , "value" ),
63- optional = ("protected" , "variable_type" , "masked" , "environment_scope" ),
65+ optional = (
66+ "protected" ,
67+ "variable_type" ,
68+ "masked" ,
69+ "environment_scope" ,
70+ "masked_and_hidden" ,
71+ ),
6472 )
6573 _update_attrs = RequiredOptional (
66- required = ("key" , "value" ),
67- optional = ("protected" , "variable_type" , "masked" , "environment_scope" ),
74+ required = ("key" ,),
75+ optional = ("value" , " protected" , "variable_type" , "masked" , "environment_scope" ),
6876 )
0 commit comments