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

com.softlayer.api.service.Locale Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service;

import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import java.util.concurrent.Future;

/**
 * @see SoftLayer_Locale
 */
@ApiType("SoftLayer_Locale")
public class Locale extends Entity {

    @ApiProperty(canBeNullOrNotSet = true)
    protected String friendlyName;

    public String getFriendlyName() {
        return friendlyName;
    }

    public void setFriendlyName(String friendlyName) {
        friendlyNameSpecified = true;
        this.friendlyName = friendlyName;
    }

    protected boolean friendlyNameSpecified;

    public boolean isFriendlyNameSpecified() {
        return friendlyNameSpecified;
    }

    public void unsetFriendlyName() {
        friendlyName = null;
        friendlyNameSpecified = false;
    }

    /**
     * Internal identification number of a locale
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        idSpecified = true;
        this.id = id;
    }

    protected boolean idSpecified;

    public boolean isIdSpecified() {
        return idSpecified;
    }

    public void unsetId() {
        id = null;
        idSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected String languageTag;

    public String getLanguageTag() {
        return languageTag;
    }

    public void setLanguageTag(String languageTag) {
        languageTagSpecified = true;
        this.languageTag = languageTag;
    }

    protected boolean languageTagSpecified;

    public boolean isLanguageTagSpecified() {
        return languageTagSpecified;
    }

    public void unsetLanguageTag() {
        languageTag = null;
        languageTagSpecified = false;
    }

    /**
     * Locale name
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        nameSpecified = true;
        this.name = name;
    }

    protected boolean nameSpecified;

    public boolean isNameSpecified() {
        return nameSpecified;
    }

    public void unsetName() {
        name = null;
        nameSpecified = false;
    }

    public Service asService(ApiClient client) {
        return service(client, id);
    }

    public static Service service(ApiClient client) {
        return client.createService(Service.class, null);
    }

    public static Service service(ApiClient client, Long id) {
        return client.createService(Service.class, id == null ? null : id.toString());
    }

    /**
     * @see SoftLayer_Locale
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Locale")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * @see SoftLayer_Locale::getClosestToLanguageTag
         */
        @ApiMethod
        public Locale getClosestToLanguageTag(String languageTag);

        /**
         * @see SoftLayer_Locale::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Locale getObject();

    }

    public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {

        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Async version of {@link Service#getClosestToLanguageTag}
         */
        public Future getClosestToLanguageTag(String languageTag);

        public Future getClosestToLanguageTag(String languageTag, ResponseHandler callback);

        /**
         * Async version of {@link Service#getObject}
         */
        public Future getObject();

        public Future getObject(ResponseHandler callback);

    }

    public static class Mask extends Entity.Mask {

        public Mask friendlyName() {
            withLocalProperty("friendlyName");
            return this;
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask languageTag() {
            withLocalProperty("languageTag");
            return this;
        }

        public Mask name() {
            withLocalProperty("name");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy