All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.streamthoughts.jikkou.kafka.models.V1KafkaPrincipalAuthorizationSpec Maven / Gradle / Ivy

The newest version!
/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright (c) The original authors
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package io.streamthoughts.jikkou.kafka.models;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.streamthoughts.jikkou.core.annotation.Description;
import io.streamthoughts.jikkou.core.annotation.Reflectable;
import java.beans.ConstructorProperties;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.Generated;
import lombok.Builder;
import lombok.Singular;
import lombok.With;
import lombok.extern.jackson.Jacksonized;


/**
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Builder(builderMethodName = "builder", toBuilder = true, setterPrefix = "with")
@With
@Description("")
@JsonPropertyOrder({
    "acls",
    "roles"
})
@Jacksonized
@Reflectable
@Generated("jsonschema2pojo")
public class V1KafkaPrincipalAuthorizationSpec {

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("acls")
    @Singular
    private List acls = new ArrayList();
    @JsonProperty("roles")
    @JsonDeserialize(as = java.util.LinkedHashSet.class)
    @Singular
    private Set roles = new LinkedHashSet();

    /**
     * No args constructor for use in serialization
     * 
     */
    public V1KafkaPrincipalAuthorizationSpec() {
    }

    /**
     * 
     * @param acls
     * @param roles
     */
    @ConstructorProperties({
        "acls",
        "roles"
    })
    public V1KafkaPrincipalAuthorizationSpec(List acls, Set roles) {
        super();
        this.acls = acls;
        this.roles = roles;
    }

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("acls")
    public List getAcls() {
        return acls;
    }

    @JsonProperty("roles")
    public Set getRoles() {
        return roles;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(V1KafkaPrincipalAuthorizationSpec.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("acls");
        sb.append('=');
        sb.append(((this.acls == null)?"":this.acls));
        sb.append(',');
        sb.append("roles");
        sb.append('=');
        sb.append(((this.roles == null)?"":this.roles));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.acls == null)? 0 :this.acls.hashCode()));
        result = ((result* 31)+((this.roles == null)? 0 :this.roles.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof V1KafkaPrincipalAuthorizationSpec) == false) {
            return false;
        }
        V1KafkaPrincipalAuthorizationSpec rhs = ((V1KafkaPrincipalAuthorizationSpec) other);
        return (((this.acls == rhs.acls)||((this.acls!= null)&&this.acls.equals(rhs.acls)))&&((this.roles == rhs.roles)||((this.roles!= null)&&this.roles.equals(rhs.roles))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy