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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.notificationhubs.models.Sku;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Description of a NotificationHub Resource. */
@Fluent
public final class DebugSendResponseInner extends Resource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(DebugSendResponseInner.class);

    /*
     * Properties of the NotificationHub.
     */
    @JsonProperty(value = "properties")
    private DebugSendResult innerProperties;

    /*
     * The sku of the created namespace
     */
    @JsonProperty(value = "sku")
    private Sku sku;

    /**
     * Get the innerProperties property: Properties of the NotificationHub.
     *
     * @return the innerProperties value.
     */
    private DebugSendResult innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the sku property: The sku of the created namespace.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: The sku of the created namespace.
     *
     * @param sku the sku value to set.
     * @return the DebugSendResponseInner object itself.
     */
    public DebugSendResponseInner withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DebugSendResponseInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DebugSendResponseInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the success property: successful send.
     *
     * @return the success value.
     */
    public Float success() {
        return this.innerProperties() == null ? null : this.innerProperties().success();
    }

    /**
     * Set the success property: successful send.
     *
     * @param success the success value to set.
     * @return the DebugSendResponseInner object itself.
     */
    public DebugSendResponseInner withSuccess(Float success) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DebugSendResult();
        }
        this.innerProperties().withSuccess(success);
        return this;
    }

    /**
     * Get the failure property: send failure.
     *
     * @return the failure value.
     */
    public Float failure() {
        return this.innerProperties() == null ? null : this.innerProperties().failure();
    }

    /**
     * Set the failure property: send failure.
     *
     * @param failure the failure value to set.
     * @return the DebugSendResponseInner object itself.
     */
    public DebugSendResponseInner withFailure(Float failure) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DebugSendResult();
        }
        this.innerProperties().withFailure(failure);
        return this;
    }

    /**
     * Get the results property: actual failure description.
     *
     * @return the results value.
     */
    public Object results() {
        return this.innerProperties() == null ? null : this.innerProperties().results();
    }

    /**
     * Set the results property: actual failure description.
     *
     * @param results the results value to set.
     * @return the DebugSendResponseInner object itself.
     */
    public DebugSendResponseInner withResults(Object results) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DebugSendResult();
        }
        this.innerProperties().withResults(results);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
        if (sku() != null) {
            sku().validate();
        }
    }
}
