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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Job endpoint definition. */
@Fluent
public final class JobService {
    /*
     * Url for endpoint.
     */
    @JsonProperty(value = "endpoint")
    private String endpoint;

    /*
     * Any error in the service.
     */
    @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
    private String errorMessage;

    /*
     * Endpoint type.
     */
    @JsonProperty(value = "jobServiceType")
    private String jobServiceType;

    /*
     * Port for endpoint.
     */
    @JsonProperty(value = "port")
    private Integer port;

    /*
     * Additional properties to set on the endpoint.
     */
    @JsonProperty(value = "properties")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> properties;

    /*
     * Status of endpoint.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private String status;

    /** Creates an instance of JobService class. */
    public JobService() {
    }

    /**
     * Get the endpoint property: Url for endpoint.
     *
     * @return the endpoint value.
     */
    public String endpoint() {
        return this.endpoint;
    }

    /**
     * Set the endpoint property: Url for endpoint.
     *
     * @param endpoint the endpoint value to set.
     * @return the JobService object itself.
     */
    public JobService withEndpoint(String endpoint) {
        this.endpoint = endpoint;
        return this;
    }

    /**
     * Get the errorMessage property: Any error in the service.
     *
     * @return the errorMessage value.
     */
    public String errorMessage() {
        return this.errorMessage;
    }

    /**
     * Get the jobServiceType property: Endpoint type.
     *
     * @return the jobServiceType value.
     */
    public String jobServiceType() {
        return this.jobServiceType;
    }

    /**
     * Set the jobServiceType property: Endpoint type.
     *
     * @param jobServiceType the jobServiceType value to set.
     * @return the JobService object itself.
     */
    public JobService withJobServiceType(String jobServiceType) {
        this.jobServiceType = jobServiceType;
        return this;
    }

    /**
     * Get the port property: Port for endpoint.
     *
     * @return the port value.
     */
    public Integer port() {
        return this.port;
    }

    /**
     * Set the port property: Port for endpoint.
     *
     * @param port the port value to set.
     * @return the JobService object itself.
     */
    public JobService withPort(Integer port) {
        this.port = port;
        return this;
    }

    /**
     * Get the properties property: Additional properties to set on the endpoint.
     *
     * @return the properties value.
     */
    public Map<String, String> properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Additional properties to set on the endpoint.
     *
     * @param properties the properties value to set.
     * @return the JobService object itself.
     */
    public JobService withProperties(Map<String, String> properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the status property: Status of endpoint.
     *
     * @return the status value.
     */
    public String status() {
        return this.status;
    }

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