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

com.citrix.netscaler.nitro.resource.config.cs.cspolicylabel Maven / Gradle / Ivy

Go to download

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.cs;

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 cspolicylabel_response extends base_response
{
	public cspolicylabel[] cspolicylabel;
}
/**
* Configuration for CS policy label resource.
*/

public class cspolicylabel extends base_resource
{
	private String labelname;
	private String cspolicylabeltype;
	private String newname;

	//------- Read only Parameter ---------;

	private Long numpol;
	private Long hits;
	private String policyname;
	private Long priority;
	private String targetvserver;
	private String gotopriorityexpression;
	private String labeltype;
	private String invoke_labelname;
	private Long __count;

	/**
	* 
	* Name for the policy label. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. 
The label name must be unique within the list of policy labels for content switching.
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 label\? or \?my policylabel\?).
	* 
*/ public void set_labelname(String labelname) throws Exception{ this.labelname = labelname; } /** *
	* Name for the policy label. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. 
The label name must be unique within the list of policy labels for content switching.
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 label\? or \?my policylabel\?).
	* 
*/ public String get_labelname() throws Exception { return this.labelname; } /** *
	* Protocol supported by the policy label. All policies bound to the policy label must either match the specified protocol or be a subtype of that protocol. Available settings function as follows:
* HTTP - Supports policies that process HTTP traffic. Used to access unencrypted Web sites. (The default.)
* SSL - Supports policies that process HTTPS/SSL encrypted traffic. Used to access encrypted Web sites.
* TCP - Supports policies that process any type of TCP traffic, including HTTP.
* SSL_TCP - Supports policies that process SSL-encrypted TCP traffic, including SSL.
* UDP - Supports policies that process any type of UDP-based traffic, including DNS.
* DNS - Supports policies that process DNS traffic.
* ANY - Supports all types of policies except HTTP, SSL, and TCP.             
* SIP_UDP - Supports policies that process UDP based Session Initiation Protocol (SIP) traffic. SIP initiates, manages, and terminates multimedia communications sessions, and has emerged as the standard for Internet telephony (VoIP).
* RTSP - Supports policies that process Real Time Streaming Protocol (RTSP) traffic. RTSP provides delivery of multimedia and other streaming data, such as audio, video, and other types of streamed media.
* RADIUS - Supports policies that process Remote Authentication Dial In User Service (RADIUS) traffic. RADIUS supports combined authentication, authorization, and auditing services for network management.
* MYSQL - Supports policies that process MYSQL traffic.
* MSSQL - Supports policies that process Microsoft SQL traffic.
Possible values = HTTP, TCP, RTSP, SSL, SSL_TCP, UDP, DNS, SIP_UDP, ANY, RADIUS, RDP, MYSQL, MSSQL, DIAMETER, SSL_DIAMETER, FTP *
*/ public void set_cspolicylabeltype(String cspolicylabeltype) throws Exception{ this.cspolicylabeltype = cspolicylabeltype; } /** *
	* Protocol supported by the policy label. All policies bound to the policy label must either match the specified protocol or be a subtype of that protocol. Available settings function as follows:
* HTTP - Supports policies that process HTTP traffic. Used to access unencrypted Web sites. (The default.)
* SSL - Supports policies that process HTTPS/SSL encrypted traffic. Used to access encrypted Web sites.
* TCP - Supports policies that process any type of TCP traffic, including HTTP.
* SSL_TCP - Supports policies that process SSL-encrypted TCP traffic, including SSL.
* UDP - Supports policies that process any type of UDP-based traffic, including DNS.
* DNS - Supports policies that process DNS traffic.
* ANY - Supports all types of policies except HTTP, SSL, and TCP.             
* SIP_UDP - Supports policies that process UDP based Session Initiation Protocol (SIP) traffic. SIP initiates, manages, and terminates multimedia communications sessions, and has emerged as the standard for Internet telephony (VoIP).
* RTSP - Supports policies that process Real Time Streaming Protocol (RTSP) traffic. RTSP provides delivery of multimedia and other streaming data, such as audio, video, and other types of streamed media.
* RADIUS - Supports policies that process Remote Authentication Dial In User Service (RADIUS) traffic. RADIUS supports combined authentication, authorization, and auditing services for network management.
* MYSQL - Supports policies that process MYSQL traffic.
* MSSQL - Supports policies that process Microsoft SQL traffic.
Possible values = HTTP, TCP, RTSP, SSL, SSL_TCP, UDP, DNS, SIP_UDP, ANY, RADIUS, RDP, MYSQL, MSSQL, DIAMETER, SSL_DIAMETER, FTP *
*/ public String get_cspolicylabeltype() throws Exception { return this.cspolicylabeltype; } /** *
	* The new name of the content switching policylabel.
Minimum length = 1 *
*/ public void set_newname(String newname) throws Exception{ this.newname = newname; } /** *
	* The new name of the content switching policylabel.
Minimum length = 1 *
*/ public String get_newname() throws Exception { return this.newname; } /** *
	* number of polices bound to label.
	* 
*/ public Long get_numpol() throws Exception { return this.numpol; } /** *
	* Number of times policy label was invoked.
	* 
*/ public Long get_hits() throws Exception { return this.hits; } /** *
	* Name of the content switching policy.
	* 
*/ public String get_policyname() throws Exception { return this.policyname; } /** *
	* Specifies the priority of the policy.
	* 
*/ public Long get_priority() throws Exception { return this.priority; } /** *
	* Name of the virtual server to which to forward requests that match the policy.
	* 
*/ public String get_targetvserver() throws Exception { return this.targetvserver; } /** *
	* Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
	* 
*/ public String get_gotopriorityexpression() throws Exception { return this.gotopriorityexpression; } /** *
	* Type of policy label invocation.
Possible values = policylabel *
*/ public String get_labeltype() throws Exception { return this.labeltype; } /** *
	* Name of the label to invoke if the current policy rule evaluates to TRUE.
	* 
*/ public String get_invoke_labelname() throws Exception { return this.invoke_labelname; } /** *
	* 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{ cspolicylabel_response result = (cspolicylabel_response) service.get_payload_formatter().string_to_resource(cspolicylabel_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.cspolicylabel; } /** *
	* Returns the value of object identifier argument
	* 
*/ protected String get_object_name() { return this.labelname; } /** * Use this API to add cspolicylabel. */ public static base_response add(nitro_service client, cspolicylabel resource) throws Exception { cspolicylabel addresource = new cspolicylabel(); addresource.labelname = resource.labelname; addresource.cspolicylabeltype = resource.cspolicylabeltype; return addresource.add_resource(client); } /** * Use this API to add cspolicylabel resources. */ public static base_responses add(nitro_service client, cspolicylabel resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cspolicylabel addresources[] = new cspolicylabel[resources.length]; for (int i=0;i 0) { cspolicylabel deleteresources[] = new cspolicylabel[labelname.length]; for (int i=0;i 0) { cspolicylabel deleteresources[] = new cspolicylabel[resources.length]; for (int i=0;i0) { cspolicylabel response[] = new cspolicylabel[labelname.length]; cspolicylabel obj[] = new cspolicylabel[labelname.length]; for (int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy