Do executes the "resourceviews.zoneViews.listResources" call. Exactly one of *ZoneViewsListResourcesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ZoneViewsListResourcesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.


// method id "resourceviews.zoneViews.listResources":

type ZoneViewsListResourcesCall struct {
	s            *Service
	project      string
	zone         string
	resourceView string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context

// ListResources: List the resources of the resource view.
func (r *ZoneViewsService) ListResources(project string, zone string, resourceView string) *ZoneViewsListResourcesCall {
	c := &ZoneViewsListResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.project = project = zone
	c.resourceView = resourceView
	return c

// Format sets the optional parameter "format": The requested format of
// the return value. It can be URL or URL_PORT. A JSON object will be
// included in the response based on the format. The default format is
// NONE, which results in no JSON in the response.
// Possible values:
//   "NONE"
//   "URL"
//   "URL_PORT"
func (c *ZoneViewsListResourcesCall) Format(format string) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("format", format)
	return c

// ListState sets the optional parameter "listState": The state of the
// instance to list. By default, it lists all instances.
// Possible values:
//   "ALL" (default)
//   "RUNNING"
func (c *ZoneViewsListResourcesCall) ListState(listState string) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("listState", listState)
	return c

// MaxResults sets the optional parameter "maxResults": Maximum count of
// results to be returned. Acceptable values are 0 to 5000, inclusive.
// (Default: 5000)
func (c *ZoneViewsListResourcesCall) MaxResults(maxResults int64) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
	return c

// PageToken sets the optional parameter "pageToken": Specifies a
// nextPageToken returned by a previous list request. This token can be
// used to request the next page of results from a previous list
// request.
func (c *ZoneViewsListResourcesCall) PageToken(pageToken string) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("pageToken", pageToken)
	return c

// ServiceName sets the optional parameter "serviceName": The service
// name to return in the response. It is optional and if it is not set,
// all the service end points will be returned.
func (c *ZoneViewsListResourcesCall) ServiceName(serviceName string) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("serviceName", serviceName)
	return c

// Fields allows partial responses to be retrieved. See
// for more information.
func (c *ZoneViewsListResourcesCall) Fields(s ...googleapi.Field) *ZoneViewsListResourcesCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c

// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ZoneViewsListResourcesCall) IfNoneMatch(entityTag string) *ZoneViewsListResourcesCall {
	c.ifNoneMatch_ = entityTag
	return c

// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ZoneViewsListResourcesCall) Context(ctx context.Context) *ZoneViewsListResourcesCall {
	c.ctx_ = ctx
	return c

func (c *ZoneViewsListResourcesCall) doRequest(alt string) (*http.Response, error) {
	reqHeaders := make(http.Header)
	reqHeaders.Set("User-Agent", c.s.userAgent())
	if c.ifNoneMatch_ != "" {
		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
	var body io.Reader = nil
	c.urlParams_.Set("alt", alt)
	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/resourceViews/{resourceView}/resources")
	urls += "?" + c.urlParams_.Encode()
	req, _ := http.NewRequest("GET", urls, body)
	req.Header = reqHeaders
	googleapi.Expand(req.URL, map[string]string{
		"project":      c.project,
		"resourceView": c.resourceView,
	return gensupport.SendRequest(c.ctx_, c.s.client, req)

// Do executes the "resourceviews.zoneViews.listResources" call.
// Exactly one of *ZoneViewsListResourcesResponse or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *ZoneViewsListResourcesResponse.ServerResponse.Header or (if a