|
| 1 | +/** |
| 2 | + * ContainerProxy |
| 3 | + * |
| 4 | + * Copyright (C) 2016-2024 Open Analytics |
| 5 | + * |
| 6 | + * =========================================================================== |
| 7 | + * |
| 8 | + * This program is free software: you can redistribute it and/or modify |
| 9 | + * it under the terms of the Apache License as published by |
| 10 | + * The Apache Software Foundation, either version 2 of the License, or |
| 11 | + * (at your option) any later version. |
| 12 | + * |
| 13 | + * This program is distributed in the hope that it will be useful, |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | + * Apache License for more details. |
| 17 | + * |
| 18 | + * You should have received a copy of the Apache License |
| 19 | + * along with this program. If not, see <http://www.apache.org/licenses/> |
| 20 | + */ |
| 21 | +package eu.openanalytics.containerproxy.model.spec; |
| 22 | + |
| 23 | +import java.util.List; |
| 24 | +import java.util.Map; |
| 25 | +import java.util.Optional; |
| 26 | + |
| 27 | +public class DockerDeviceRequest { |
| 28 | + |
| 29 | + private String driver; |
| 30 | + private Integer count; |
| 31 | + private List<String> deviceIds; |
| 32 | + private List<List<String>> capabilities; |
| 33 | + private Map<String, String> options; |
| 34 | + |
| 35 | + public DockerDeviceRequest(String driver, Integer count, List<String> deviceIds, List<List<String>> capabilities, Map<String, String> options) { |
| 36 | + this.driver = driver; |
| 37 | + this.count = count; |
| 38 | + this.deviceIds = deviceIds; |
| 39 | + this.capabilities = capabilities; |
| 40 | + this.options = options; |
| 41 | + } |
| 42 | + |
| 43 | + public Optional<String> getDriver() { |
| 44 | + return Optional.ofNullable(driver); |
| 45 | + } |
| 46 | + |
| 47 | + public void setDriver(String driver) { |
| 48 | + this.driver = driver; |
| 49 | + } |
| 50 | + |
| 51 | + public Optional<Integer> getCount() { |
| 52 | + return Optional.ofNullable(count); |
| 53 | + } |
| 54 | + |
| 55 | + public void setCount(Integer count) { |
| 56 | + this.count = count; |
| 57 | + } |
| 58 | + |
| 59 | + public Optional<List<String>> getDeviceIds() { |
| 60 | + return Optional.ofNullable(deviceIds); |
| 61 | + } |
| 62 | + |
| 63 | + public void setDeviceIds(List<String> deviceIds) { |
| 64 | + this.deviceIds = deviceIds; |
| 65 | + } |
| 66 | + |
| 67 | + public Optional<List<List<String>>> getCapabilities() { |
| 68 | + return Optional.ofNullable(capabilities); |
| 69 | + } |
| 70 | + |
| 71 | + public void setCapabilities(List<List<String>> capabilities) { |
| 72 | + this.capabilities = capabilities; |
| 73 | + } |
| 74 | + |
| 75 | + public Optional<Map<String, String>> getOptions() { |
| 76 | + return Optional.ofNullable(options); |
| 77 | + } |
| 78 | + |
| 79 | + public void setOptions(Map<String, String> options) { |
| 80 | + this.options = options; |
| 81 | + } |
| 82 | + |
| 83 | +} |
0 commit comments