com.citrix.netscaler.nitro.resource.config.aaa.aaauser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nitro Show documentation
Show all versions of nitro Show documentation
The Citrix® NetScaler® NITRO client for Java allows you to configure and monitor the NetScaler appliance programmatically in Java based applications. Source code taken from Build 121 of NetScaler release 10.1
The newest version!
/*
* Copyright (c) 2008-2015 Citrix Systems, Inc.
*
* Licensed 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 com.citrix.netscaler.nitro.resource.config.aaa;
import com.citrix.netscaler.nitro.resource.base.*;
import com.citrix.netscaler.nitro.service.nitro_service;
import com.citrix.netscaler.nitro.service.options;
import com.citrix.netscaler.nitro.util.*;
import com.citrix.netscaler.nitro.exception.nitro_exception;
class aaauser_response extends base_response
{
public aaauser[] aaauser;
}
/**
* Configuration for AAA user resource.
*/
public class aaauser extends base_resource
{
private String username;
private String password;
private Boolean loggedin;
private Long __count;
/**
*
* Name for the user. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the user is added.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or
single quotation marks (for example, "my aaa user" or "my aaa user").
Minimum length = 1
*
*/
public void set_username(String username) throws Exception{
this.username = username;
}
/**
*
* Name for the user. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after the user is added.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or
single quotation marks (for example, "my aaa user" or "my aaa user").
Minimum length = 1
*
*/
public String get_username() throws Exception {
return this.username;
}
/**
*
* Password with which the user logs on. Required for any user account that does not exist on an external authentication server.
If you are not using an external authentication server, all user accounts must have a password. If you are using an external authentication server, you must provide a password for local user accounts that do not exist on the authentication server.
Minimum length = 1
*
*/
public void set_password(String password) throws Exception{
this.password = password;
}
/**
*
* Password with which the user logs on. Required for any user account that does not exist on an external authentication server.
If you are not using an external authentication server, all user accounts must have a password. If you are using an external authentication server, you must provide a password for local user accounts that do not exist on the authentication server.
Minimum length = 1
*
*/
public String get_password() throws Exception {
return this.password;
}
/**
*
* Show whether the user is logged in or not.
*
*/
public void set_loggedin(boolean loggedin) throws Exception {
this.loggedin = new Boolean(loggedin);
}
/**
*
* Show whether the user is logged in or not.
*
*/
public void set_loggedin(Boolean loggedin) throws Exception{
this.loggedin = loggedin;
}
/**
*
* Show whether the user is logged in or not.
*
*/
public Boolean get_loggedin() throws Exception {
return this.loggedin;
}
/**
*
* converts nitro response into object and returns the object array in case of get request.
*
*/
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception{
aaauser_response result = (aaauser_response) service.get_payload_formatter().string_to_resource(aaauser_response.class, response);
if(result.errorcode != 0) {
if (result.errorcode == 444) {
service.clear_session();
}
if(result.severity != null)
{
if (result.severity.equals("ERROR"))
throw new nitro_exception(result.message,result.errorcode);
}
else
{
throw new nitro_exception(result.message,result.errorcode);
}
}
return result.aaauser;
}
/**
*
* Returns the value of object identifier argument
*
*/
protected String get_object_name() {
return this.username;
}
/**
* Use this API to add aaauser.
*/
public static base_response add(nitro_service client, aaauser resource) throws Exception {
aaauser addresource = new aaauser();
addresource.username = resource.username;
addresource.password = resource.password;
return addresource.add_resource(client);
}
/**
* Use this API to add aaauser resources.
*/
public static base_responses add(nitro_service client, aaauser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
aaauser addresources[] = new aaauser[resources.length];
for (int i=0;i 0) {
aaauser deleteresources[] = new aaauser[username.length];
for (int i=0;i 0) {
aaauser deleteresources[] = new aaauser[resources.length];
for (int i=0;i 0) {
aaauser updateresources[] = new aaauser[resources.length];
for (int i=0;i0) {
aaauser response[] = new aaauser[username.length];
aaauser obj[] = new aaauser[username.length];
for (int i=0;i