public static Protos . Resource ranges ( String name , String role , Protos . Value . Range ... ranges ) { checkNotNull ( name ) ; checkNotNull ( role ) ; checkNotNull ( ranges ) ; return Protos . Resource . newBuilder ( ) . setName ( name ) . setType ( Protos . Value . Type . RANGES ) . setRanges ( Protos . Value . Ranges . newBuilder ( ) . addAllRange ( Arrays . asList ( ranges ) ) . build ( ) ) . setRole ( role ) . build ( ) ; }
Construct a range resource .