// GetResourceContentWithParams - Returns content of the given resource.
// Returns -  content - Resource content. base64Encoded - True, if content was served as base64.
551922
func (c *Page) GetResourceContentWithParams(v *PageGetResourceContentParams) (string, bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Page.getResourceContent", Params: v})
	if err != nil {
		return "", false, err
	}

	var chromeData struct {
		Result struct {
			Content       string
			Base64Encoded bool
		}
	}

	if resp == nil {
		return "", false, &gcdmessage.ChromeEmptyResponseErr{}
	}

	// test if error first
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", false, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}

	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", false, err
	}

	return chromeData.Result.Content, chromeData.Result.Base64Encoded, nil
}
559923
func (s *ProjectsService) GetCommitContent(projectName, commitID, fileID string) (string, *Response, error) {
	u := fmt.Sprintf("projects/%s/commits/%s/files/%s/content", url.QueryEscape(projectName), commitID, fileID)
	return getStringResponseWithoutOptions(s.client, u)
}
876552
func (base *Base) GetContent(ctx context.Context, path string) ([]byte, error) {
	ctx, done := dcontext.WithTrace(ctx)
	defer done("%s.GetContent(%q)", base.Name(), path)

	if !storagedriver.PathRegexp.MatchString(path) {
		return nil, storagedriver.InvalidPathError{Path: path, DriverName: base.StorageDriver.Name()}
	}

	start := time.Now()
	b, e := base.StorageDriver.GetContent(ctx, path)
	storageAction.WithValues(base.Name(), "GetContent").UpdateSince(start)
	return b, base.setDriverName(e)
}
934957
func (r *HelloResource) GetParams() []*restful.Parameter {
	params := []*restful.Parameter{}
	params = append(params, restful.QueryParameter("name", "your name").
		DataType("string").
		AllowMultiple(false).
		Required(true))

	return params
}
421441
func (surface *Surface) GetContent() Content {
	ret := Content(C.cairo_surface_get_content(surface.Ptr))
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
775961
func (client *Client) GetMessageContent(messageID string) *GetMessageContentCall {
	return &GetMessageContentCall{
		c:         client,
		messageID: messageID,
	}
}
978203
func (t *TrendService) GetContents(req TrendContentsRequest) (*TrendContentsResponse, error) {

	v := url.Values{}
	if req.GenreID == nil {
		// ジャンル指定は必須
		return nil, errors.New("genreId has not set")
	}
	v.Set("genreId", strconv.Itoa(*req.GenreID))

	if req.Lang != nil {
		v.Set("lang", *req.Lang)
	}
	if req.StartNo != nil {
		v.Set("s", strconv.Itoa(*req.StartNo))
	}
	if req.Num != nil {
		v.Set("n", strconv.Itoa(*req.Num))
	}

	var trendRes TrendContentsResponse
	res, err := t.client.get(t.ctx, TrendContentsURL, v, &trendRes)
	if err != nil {
		return nil, err
	}

	defer res.Body.Close()

	return &trendRes, nil
}
891504
func GetParam(name string, r *http.Request, index ...int) string {
	if params := r.Context().Value(ParamsKey); params != nil {
		params := params.(Params)
		if name != "*" {
			name = ":" + name
		}
		if param := params[name]; param != nil {
			switch param := param.(type) {
			case []string:
				if len(index) > 0 {
					if index[0] < len(param) {
						return param[index[0]]
					}
					return ""
				}
				return param[0]
			default:
				return param.(string)
			}
		}
	}
	return ""
}
603085
func (ctx *Context) GETParams() map[string][]string {
	res := make(map[string][]string)
	ctx.Request.URI().QueryArgs().VisitAll(func(key, value []byte) {
		res[string(key)] = append(res[string(key)], string(value))
	})
	return res
}
319241
func (builder *StoreValueCommandBuilder) WithContent(object *Object) *StoreValueCommandBuilder {
	setProtobufFromValue(builder.protobuf, object)
	builder.value = object
	return builder
}
243387
func (c *CommitFile) GetContentsURL() string {
	if c == nil || c.ContentsURL == nil {
		return ""
	}
	return *c.ContentsURL
}
738227
func (b *Bucket) GetWithParams(path string, params url.Values) (data []byte, err error) {
	resp, err := b.GetResponseWithParamsAndHeaders(path, params, nil)
	if err != nil {
		return nil, err
	}
	data, err = ioutil.ReadAll(resp.Body)
	resp.Body.Close()
	return data, err
}
516870
func GetFileContents(path string) (*string, error) {
	if _, err := os.Stat(path); os.IsNotExist(err) {
		return nil, err
	}

	contents, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}

	strContents := string(contents)
	//If file is empty, return nil
	if strContents == "" {
		return nil, nil
	}
	return &strContents, nil
}
917867
func (s *ServicesService) GetWithContext(ctx context.Context, idOrName string) (*Service, *http.Response, error) {
	resource, _ := url.Parse(servicesResourcePath)
	resource.Path = path.Join(resource.Path, idOrName)

	req, err := s.client.NewRequest(ctx, http.MethodGet, resource, nil)

	if err != nil {
		return nil, nil, err
	}

	svc := new(Service)

	res, err := s.client.Do(req, svc)

	if err != nil {
		return nil, res, err
	}

	return svc, res, nil
}
1358753
func PartialContent(w http.ResponseWriter, response interface{}) {
	Respond(w, http.StatusPartialContent, response)
}
1353538
func (c *DOM) GetContentQuadsWithParams(v *DOMGetContentQuadsParams) ([]float64, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "DOM.getContentQuads", Params: v})
	if err != nil {
		return nil, err
	}

	var chromeData struct {
		Result struct {
			Quads []float64
		}
	}

	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}

	// test if error first
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}

	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}

	return chromeData.Result.Quads, nil
}
690937
func (o *GetConsentRequestParams) WithContext(ctx context.Context) *GetConsentRequestParams {
	o.SetContext(ctx)
	return o
}