// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
358579
func (c *ImageClient) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
103388
func (c *SecurityClient) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
60493
func (c *BatchV1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
390686
func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
847591
func NewClient(parseAppID string, RESTAPIKey string) (*Client, error) {
	return &Client{appID: parseAppID, restApiKey: RESTAPIKey}, nil
}
905281
func (c *TraefikV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
554754
func (c *NodeV1beta1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
1052019
func (c *StorageV1beta1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
789593
func (c *AuthenticationV1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
498789
func (c *AuthorizationV1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
172511
func (c *MyprojectV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
746735
func HTTPClient(client *http.Client) HTTPOption {
	return func(c *HTTPCollector) { c.client = client }
}
93443
func (c *BatchV2alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
465051
func RESTRequest(url, token string, data interface{}, result interface{}) (*http.Response, error) {
	var request *http.Request
	if data != nil {
		jsonBytes, err := json.Marshal(data)
		if err != nil {
			return nil, err
		}
		reader := bytes.NewBuffer(jsonBytes)
		req, err := http.NewRequest("POST", url, reader)
		if err != nil {
			return nil, err
		}
		req.Header.Set("Content-Type", "application/json")
		request = req
	} else {
		req, err := http.NewRequest("GET", url, nil)
		if err != nil {
			return nil, err
		}
		request = req
	}
	request.Header.Set("Accept-Encoding", "application/json")
	if token != "" {
		request.Header.Set("Authorization", "Bearer "+token)
	}

	client := &http.Client{}
	resp, err := client.Do(request)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	// Make sure there is data to encode
	if result == nil {
		return resp, nil
	}
	if len(resp.Header["Content-Length"]) > 1 &&
		resp.Header["Content-Length"][0] == "0" {
		return resp, nil
	} else if len(resp.Header["Content-Type"]) > 1 &&
		resp.Header["Content-Type"][0] != "application/json" {
		return resp, errors.New("Response was not json: " + resp.Header["Content-Type"][0])
	}
	decoder := json.NewDecoder(resp.Body)
	err = decoder.Decode(result)
	if err != nil {
		return nil, err
	}

	return resp, nil
}
1372183
func (c *StorageV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
895145
func MakeClient(frontend base.ClientFacade, backend base.FacadeCaller, client *httprequest.Client) *Client {
	return &Client{
		ClientFacade: frontend,
		facade:       backend,
		client:       client,
	}
}
1184134
func (c *RbacV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}