// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.relay.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.relay.models.Relaytype;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Properties of the WCF relay. */
@Fluent
public final class WcfRelayProperties {
    /*
     * Returns true if the relay is dynamic; otherwise, false.
     */
    @JsonProperty(value = "isDynamic", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isDynamic;

    /*
     * The time the WCF relay was created.
     */
    @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime createdAt;

    /*
     * The time the namespace was updated.
     */
    @JsonProperty(value = "updatedAt", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime updatedAt;

    /*
     * The number of listeners for this relay. Note that min :1 and max:25 are
     * supported.
     */
    @JsonProperty(value = "listenerCount", access = JsonProperty.Access.WRITE_ONLY)
    private Integer listenerCount;

    /*
     * WCF relay type.
     */
    @JsonProperty(value = "relayType")
    private Relaytype relayType;

    /*
     * Returns true if client authorization is needed for this relay;
     * otherwise, false.
     */
    @JsonProperty(value = "requiresClientAuthorization")
    private Boolean requiresClientAuthorization;

    /*
     * Returns true if transport security is needed for this relay; otherwise,
     * false.
     */
    @JsonProperty(value = "requiresTransportSecurity")
    private Boolean requiresTransportSecurity;

    /*
     * The usermetadata is a placeholder to store user-defined string data for
     * the WCF Relay endpoint. For example, it can be used to store descriptive
     * data, such as list of teams and their contact information. Also,
     * user-defined configuration settings can be stored.
     */
    @JsonProperty(value = "userMetadata")
    private String userMetadata;

    /**
     * Get the isDynamic property: Returns true if the relay is dynamic; otherwise, false.
     *
     * @return the isDynamic value.
     */
    public Boolean isDynamic() {
        return this.isDynamic;
    }

    /**
     * Get the createdAt property: The time the WCF relay was created.
     *
     * @return the createdAt value.
     */
    public OffsetDateTime createdAt() {
        return this.createdAt;
    }

    /**
     * Get the updatedAt property: The time the namespace was updated.
     *
     * @return the updatedAt value.
     */
    public OffsetDateTime updatedAt() {
        return this.updatedAt;
    }

    /**
     * Get the listenerCount property: The number of listeners for this relay. Note that min :1 and max:25 are
     * supported.
     *
     * @return the listenerCount value.
     */
    public Integer listenerCount() {
        return this.listenerCount;
    }

    /**
     * Get the relayType property: WCF relay type.
     *
     * @return the relayType value.
     */
    public Relaytype relayType() {
        return this.relayType;
    }

    /**
     * Set the relayType property: WCF relay type.
     *
     * @param relayType the relayType value to set.
     * @return the WcfRelayProperties object itself.
     */
    public WcfRelayProperties withRelayType(Relaytype relayType) {
        this.relayType = relayType;
        return this;
    }

    /**
     * Get the requiresClientAuthorization property: Returns true if client authorization is needed for this relay;
     * otherwise, false.
     *
     * @return the requiresClientAuthorization value.
     */
    public Boolean requiresClientAuthorization() {
        return this.requiresClientAuthorization;
    }

    /**
     * Set the requiresClientAuthorization property: Returns true if client authorization is needed for this relay;
     * otherwise, false.
     *
     * @param requiresClientAuthorization the requiresClientAuthorization value to set.
     * @return the WcfRelayProperties object itself.
     */
    public WcfRelayProperties withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
        this.requiresClientAuthorization = requiresClientAuthorization;
        return this;
    }

    /**
     * Get the requiresTransportSecurity property: Returns true if transport security is needed for this relay;
     * otherwise, false.
     *
     * @return the requiresTransportSecurity value.
     */
    public Boolean requiresTransportSecurity() {
        return this.requiresTransportSecurity;
    }

    /**
     * Set the requiresTransportSecurity property: Returns true if transport security is needed for this relay;
     * otherwise, false.
     *
     * @param requiresTransportSecurity the requiresTransportSecurity value to set.
     * @return the WcfRelayProperties object itself.
     */
    public WcfRelayProperties withRequiresTransportSecurity(Boolean requiresTransportSecurity) {
        this.requiresTransportSecurity = requiresTransportSecurity;
        return this;
    }

    /**
     * Get the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the WCF
     * Relay endpoint. For example, it can be used to store descriptive data, such as list of teams and their contact
     * information. Also, user-defined configuration settings can be stored.
     *
     * @return the userMetadata value.
     */
    public String userMetadata() {
        return this.userMetadata;
    }

    /**
     * Set the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the WCF
     * Relay endpoint. For example, it can be used to store descriptive data, such as list of teams and their contact
     * information. Also, user-defined configuration settings can be stored.
     *
     * @param userMetadata the userMetadata value to set.
     * @return the WcfRelayProperties object itself.
     */
    public WcfRelayProperties withUserMetadata(String userMetadata) {
        this.userMetadata = userMetadata;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
