Package com.citrix.netscaler.nitro.resource.config.rewrite

Source Code of com.citrix.netscaler.nitro.resource.config.rewrite.rewriteglobal_binding_response

/*
* 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.rewrite;

import com.citrix.netscaler.nitro.resource.config.rewrite.rewriteglobal_rewritepolicy_binding;
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 rewriteglobal_binding_response extends base_response
{
  public rewriteglobal_binding[] rewriteglobal_binding;
}
/**
  * Binding class showing the resources that can be bound to rewriteglobal_binding.
  */

public class rewriteglobal_binding extends base_resource
{
  private rewriteglobal_rewritepolicy_binding  rewriteglobal_rewritepolicy_binding[] = null;

  /**
  * <pre>
  * rewritepolicy that can be bound to rewriteglobal.
  * </pre>
  */
  public rewriteglobal_rewritepolicy_binding[] get_rewriteglobal_rewritepolicy_bindings() throws Exception {
    return this.rewriteglobal_rewritepolicy_binding;
  }

  /**
  * <pre>
  * converts nitro response into object and returns the object array in case of get request.
  * </pre>
  */
  protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception{
    rewriteglobal_binding_response result = (rewriteglobal_binding_response) service.get_payload_formatter().string_to_resource(rewriteglobal_binding_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.rewriteglobal_binding;
  }

  /**
  * <pre>
  * Returns the value of object identifier argument
  * </pre>
  */

  protected String get_object_name() {
    return null;
  }

  /**
  * Use this API to fetch a rewriteglobal_binding resource .
  */
  public static rewriteglobal_binding get(nitro_service service) throws Exception{
    rewriteglobal_binding obj = new rewriteglobal_binding();
    rewriteglobal_binding response = (rewriteglobal_binding) obj.get_resource(service);
    return response;
  }


}
TOP

Related Classes of com.citrix.netscaler.nitro.resource.config.rewrite.rewriteglobal_binding_response

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.