aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/TenantCreateOptions.java
blob: 721d25871044ce637acda5d278d76574ff1ae6ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.application.v4.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yahoo.vespa.athenz.api.AthenzDomain;
import com.yahoo.vespa.hosted.controller.api.identifiers.Property;
import com.yahoo.vespa.hosted.controller.api.identifiers.PropertyId;

/**
 * @author bjorncs
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class TenantCreateOptions {
    public AthenzDomain athensDomain;
    public Property property;
    public PropertyId propertyId;

    public TenantCreateOptions() {}

    public TenantCreateOptions(AthenzDomain athensDomain, Property property, PropertyId propertyId) {
        this.athensDomain = athensDomain;
        this.property = property;
        this.propertyId = propertyId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("options: ");
        sb.append("athens-domain='").append(this.athensDomain.getName()).append("', ");
        sb.append("property='").append(this.property).append("'");
        if (this.propertyId != null) {
            sb.append(", propertyId='").append(this.propertyId).append("'");
        }

        return sb.toString();
    }
}