blob: b253f6ca763c9828ef1e5e216291fd5e7b244d2c [file] [log] [blame]
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.glesys.options;
import org.jclouds.http.options.BaseHttpRequestOptions;
/**
* @author Adam Lowe
* @see <a href="https://customer.glesys.com/api.php?a=doc#email_createaccount" />
*/
public class EmailCreateOptions extends BaseHttpRequestOptions {
public static class Builder {
/**
* @see EmailCreateOptions#antispamLevel
*/
public static EmailCreateOptions antispamLevel(int antispamLevel) {
return new EmailCreateOptions().antispamLevel(antispamLevel);
}
/**
* @see EmailCreateOptions#antiVirus
*/
public static EmailCreateOptions antiVirus(boolean antiVirus) {
return new EmailCreateOptions().antiVirus(antiVirus);
}
/**
* @see EmailCreateOptions#autorespond
*/
public static EmailCreateOptions autorespond(boolean autorespond) {
return new EmailCreateOptions().autorespond(autorespond);
}
/**
* @see EmailCreateOptions#autorespondSaveEmail
*/
public static EmailCreateOptions autorespondSaveEmail(boolean autorespondSaveEmail) {
return new EmailCreateOptions().autorespondSaveEmail(autorespondSaveEmail);
}
/**
* @see EmailCreateOptions#autorespondMessage
*/
public static EmailCreateOptions autorespondMessage(boolean autorespondMessage) {
return new EmailCreateOptions().autorespondMessage(autorespondMessage);
}
}
public EmailCreateOptions antispamLevel(int antispamLevel) {
formParameters.put("antispamlevel", Integer.toString(antispamLevel));
return this;
}
public EmailCreateOptions antiVirus(boolean antiVirus) {
formParameters.put("antivirus", Integer.toString(antiVirus ? 1 : 0));
return this;
}
public EmailCreateOptions autorespond(boolean autorespond) {
formParameters.put("autorespond", Integer.toString(autorespond ? 1 : 0));
return this;
}
public EmailCreateOptions autorespondSaveEmail(boolean autorespondSaveEmail) {
formParameters.put("autorespondsaveemail", Integer.toString(autorespondSaveEmail ? 1 : 0));
return this;
}
public EmailCreateOptions autorespondMessage(boolean autorespondMessage) {
formParameters.put("autorespondmessage", Integer.toString(autorespondMessage ? 1 : 0));
return this;
}
}