// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
437648
func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{})

	if obj == nil {
		return nil, err
	}
	return obj.(*corev1.Secret), err
}
1306152
func (s *ServicesService) Update(idOrName string, svc *Service) (*Service, *http.Response, error) {
	return s.UpdateWithContext(context.TODO(), idOrName, svc)
}
126962
func (c *FakeOAuthClients) Update(oAuthClient *oauth.OAuthClient) (result *oauth.OAuthClient, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(oauthclientsResource, oAuthClient), &oauth.OAuthClient{})
	if obj == nil {
		return nil, err
	}
	return obj.(*oauth.OAuthClient), err
}
718847
func (c *oAuthAuthorizeTokens) Update(oAuthAuthorizeToken *oauth.OAuthAuthorizeToken) (result *oauth.OAuthAuthorizeToken, err error) {
	result = &oauth.OAuthAuthorizeToken{}
	err = c.client.Put().
		Resource("oauthauthorizetokens").
		Name(oAuthAuthorizeToken.Name).
		Body(oAuthAuthorizeToken).
		Do().
		Into(result)
	return
}
706493
func (hash *Hash) Update(data []byte) error {
	err := tspiError(C.Tspi_Hash_UpdateHashValue(hash.handle, (C.UINT32)(len(data)), (*C.BYTE)(&data[0])))
	return err
}
629162
func (c *userIdentityMappings) Update(userIdentityMapping *user.UserIdentityMapping) (result *user.UserIdentityMapping, err error) {
	result = &user.UserIdentityMapping{}
	err = c.client.Put().
		Resource("useridentitymappings").
		Name(userIdentityMapping.Name).
		Body(userIdentityMapping).
		Do().
		Into(result)
	return
}
109568
func (crs *ConfigRepoService) Update(ctx context.Context, id string, cr *ConfigRepo) (out *ConfigRepo, resp *APIResponse, err error) {
	out = &ConfigRepo{}
	_, resp, err = crs.client.putAction(ctx, &APIClientRequest{
		Path:         fmt.Sprintf("admin/config_repos/%s", id),
		RequestBody:  cr,
		ResponseBody: out,
		APIVersion:   apiV1,
	})

	out.client = crs.client
	return
}
291700
func (r *KeyResource) Update(account, key, label string, id int) (*Key, error) {

	values := url.Values{}
	values.Add("key", key)
	values.Add("label", label)

	k := Key{}
	path := fmt.Sprintf("/users/%s/ssh-keys/%v", account, id)
	if err := r.client.do("PUT", path, nil, values, &k); err != nil {
		return nil, err
	}

	return &k, nil
}
226434
func (s *StatusService) Update(status string, params *StatusUpdateParams) (*Tweet, *http.Response, error) {
	if params == nil {
		params = &StatusUpdateParams{}
	}
	params.Status = status
	tweet := new(Tweet)
	apiError := new(APIError)
	resp, err := s.sling.New().Post("update.json").BodyForm(params).Receive(tweet, apiError)
	return tweet, resp, relevantError(err, *apiError)
}
867252
func (c *services) Update(service *api.Service) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("services").
		Name(service.Name).
		Body(service).
		Do().
		Into(result)
	return
}
1135801
func Update(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Cache-Control", "must-revalidate")
	w.Header().Set("Content-Type", "text/plain")
	w.Header().Set("Access-Control-Allow-Origin", "*")
	w.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS")
	var col, id, doc string
	if !Require(w, r, "col", &col) {
		return
	}
	if !Require(w, r, "id", &id) {
		return
	}
	defer r.Body.Close()
	bodyBytes, _ := ioutil.ReadAll(r.Body)
	doc = string(bodyBytes)
	if doc == "" && !Require(w, r, "doc", &doc) {
		return
	}
	docID, err := strconv.Atoi(id)
	if err != nil {
		http.Error(w, fmt.Sprintf("Invalid document ID '%v'.", id), 400)
		return
	}
	var newDoc map[string]interface{}
	if err := json.Unmarshal([]byte(doc), &newDoc); err != nil {
		http.Error(w, fmt.Sprintf("'%v' is not valid JSON document.", newDoc), 400)
		return
	}
	dbcol := HttpDB.Use(col)
	if dbcol == nil {
		http.Error(w, fmt.Sprintf("Collection '%s' does not exist.", col), 400)
		return
	}
	err = dbcol.Update(docID, newDoc)
	if err != nil {
		http.Error(w, fmt.Sprint(err), 500)
		return
	}
}
703580
func (s *VersionService) Update(version *Version) (*Version, *Response, error) {
	apiEndpoint := fmt.Sprintf("rest/api/2/version/%v", version.ID)
	req, err := s.client.NewRequest("PUT", apiEndpoint, version)
	if err != nil {
		return nil, nil, err
	}
	resp, err := s.client.Do(req, nil)
	if err != nil {
		jerr := NewJiraError(resp, err)
		return nil, resp, jerr
	}

	// This is just to follow the rest of the API's convention of returning a version.
	// Returning the same pointer here is pointless, so we return a copy instead.
	ret := *version
	return &ret, resp, nil
}
707376
func (c *FakeSSHCredentials) Update(sSHCredential *v1alpha2.SSHCredential) (result *v1alpha2.SSHCredential, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(sshcredentialsResource, c.ns, sSHCredential), &v1alpha2.SSHCredential{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha2.SSHCredential), err
}
150092
func (c *auditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
	result = &v1alpha1.AuditSink{}
	err = c.client.Put().
		Resource("auditsinks").
		Name(auditSink.Name).
		Body(auditSink).
		Do().
		Into(result)
	return
}
51041
func (site *Site) Update() (*Response, error) {
	options := &RequestOptions{JsonBody: site.mutableParams()}

	return site.client.Request("PUT", site.apiPath(), options, site)
}
584484
func (s *EventsService) Update(e EventKey, ev EventInfoDTO) (*http.Response, error) {
	return s.client.put(e.URI(), ev, nil)
}
622978
func (c *nodes) Update(node *api.Node) (*api.Node, error) {
	result := &api.Node{}
	if len(node.ResourceVersion) == 0 {
		err := fmt.Errorf("invalid update object, missing resource version: %v", node)
		return nil, err
	}
	err := c.r.Put().Resource(c.resourceName()).Name(node.Name).Body(node).Do().Into(result)
	return result, err
}