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

com.softlayer.api.service.locale.Timezone Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.locale;

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.List;
import java.util.concurrent.Future;

/**
 * Each User is assigned a timezone allowing for a precise local timestamp.
 *
 * @see SoftLayer_Locale_Timezone
 */
@ApiType("SoftLayer_Locale_Timezone")
public class Timezone extends Entity {

    /**
     * A timezone's identifying number.
     */
    @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;
    }

    /**
     * A timezone's long name. For example, "(GMT-06:00) America/Dallas - CST".
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String longName;

    public String getLongName() {
        return longName;
    }

    public void setLongName(String longName) {
        longNameSpecified = true;
        this.longName = longName;
    }

    protected boolean longNameSpecified;

    public boolean isLongNameSpecified() {
        return longNameSpecified;
    }

    public void unsetLongName() {
        longName = null;
        longNameSpecified = false;
    }

    /**
     * A timezone's name. For example, "America/Dallas".
     */
    @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;
    }

    /**
     * A timezone's offset based on the GMT standard. For example, Central Standard Time's offset is "-0600" from GMT=0000.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String offset;

    public String getOffset() {
        return offset;
    }

    public void setOffset(String offset) {
        offsetSpecified = true;
        this.offset = offset;
    }

    protected boolean offsetSpecified;

    public boolean isOffsetSpecified() {
        return offsetSpecified;
    }

    public void unsetOffset() {
        offset = null;
        offsetSpecified = false;
    }

    /**
     * A timezone's common abbreviation. For example, Central Standard Time's abbreviation is "CST".
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String shortName;

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        shortNameSpecified = true;
        this.shortName = shortName;
    }

    protected boolean shortNameSpecified;

    public boolean isShortNameSpecified() {
        return shortNameSpecified;
    }

    public void unsetShortName() {
        shortName = null;
        shortNameSpecified = 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());
    }

    /**
     * Each User is assigned a timezone allowing for a precise local timestamp.
     *
     * @see SoftLayer_Locale_Timezone
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Locale_Timezone")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Retrieve all timezone objects.
         *
         * @see SoftLayer_Locale_Timezone::getAllObjects
         */
        @ApiMethod
        public List getAllObjects();

        /**
         * getObject retrieves the SoftLayer_Locale_Timezone object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Locale_Timezone service. 
         *
         * @see SoftLayer_Locale_Timezone::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Timezone 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#getAllObjects}
         */
        public Future> getAllObjects();

        public Future getAllObjects(ResponseHandler> callback);

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

        public Future getObject(ResponseHandler callback);

    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy