// RelationshipFriendRequestAccept accepts a friend request from a user.
// userID: ID of the user.
334017
func (s *Session) RelationshipFriendRequestAccept(userID string) (err error) {
	err = s.relationshipCreate(userID, 1)
	return
}
585602
func (c *Client) AssociateIpAddress(p *AssociateIpAddressParameter) (*PublicIpAddress, error) {
	obj, err := c.Request("associateIpAddress", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*PublicIpAddress), err
}
807932
func (networkAclRuleApi *NetworkAclRuleApi) Get(id string) (*NetworkAclRule, error) {
	data, err := networkAclRuleApi.entityService.Get(id, map[string]string{})
	if err != nil {
		return nil, err
	}
	return parseNetworkAclRule(data), nil
}
1172486
func AttachRequestData(ctx context.Context, r *http.Request) context.Context {
	return context.WithValue(ctx, requestContextKey, r)
}
288075
func (r User_Customer_OpenIdConnect) SamlBeginAuthentication(accountId *int) (resp string, err error) {
	params := []interface{}{
		accountId,
	}
	err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "samlBeginAuthentication", params, &r.Options, &resp)
	return
}
943077
func (api *API) UpdateUserAccessRule(accessRuleID string, accessRule AccessRule) (*AccessRuleResponse, error) {
	return api.updateAccessRule("/user", accessRuleID, accessRule)
}
787763
func (api *API) UserAccessRule(accessRuleID string) (*AccessRuleResponse, error) {
	return api.retrieveAccessRule("/user", accessRuleID)
}
1015751
func (s *REST) getRelatedObjects(ctx context.Context, name string, options *metav1.GetOptions) (
	identity *userapi.Identity, identityErr error,
	user *userapi.User, userErr error,
	mapping *userinternal.UserIdentityMapping, mappingErr error,
) {
	// Initialize errors to NotFound
	identityErr = kerrs.NewNotFound(userapi.Resource("identity"), name)
	userErr = kerrs.NewNotFound(userapi.Resource("user"), "")
	mappingErr = kerrs.NewNotFound(userapi.Resource("useridentitymapping"), name)

	// GetIdentities identity
	identity, identityErr = s.identityClient.Get(name, *options)
	if identityErr != nil {
		return
	}
	if !hasUserMapping(identity) {
		return
	}

	// GetIdentities user
	user, userErr = s.userClient.Get(identity.User.Name, *options)
	if userErr != nil {
		return
	}

	// Ensure relational integrity
	if !identityReferencesUser(identity, user) {
		return
	}
	if !userReferencesIdentity(user, identity) {
		return
	}

	mapping, mappingErr = mappingFor(user, identity)

	return
}
38415
func (client *Client) GetServiceInstanceSharedFrom(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetServiceInstanceSharedFromRequest,
		URIParams:   Params{"service_instance_guid": serviceInstanceGUID},
	})
	if err != nil {
		return ServiceInstanceSharedFrom{}, nil, err
	}

	var serviceInstanceSharedFrom ServiceInstanceSharedFrom
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &serviceInstanceSharedFrom,
	}

	err = client.connection.Make(request, &response)
	return serviceInstanceSharedFrom, response.Warnings, err
}
714622
func (s *Service) FormConnectionURL(r *http.Request, id uint64) string {
	return fmt.Sprintf("%s://%s/db/connections/%d", s.protocol(), r.Host, id)
}
1069052
func (r Account_Reports_Request) GetAccountContact() (resp datatypes.Account_Contact, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Reports_Request", "getAccountContact", nil, &r.Options, &resp)
	return
}
447727
func (h *HTTPBin) ImageAccept(w http.ResponseWriter, r *http.Request) {
	accept := r.Header.Get("Accept")
	if accept == "" || strings.Contains(accept, "image/png") || strings.Contains(accept, "image/*") {
		doImage(w, "png")
	} else if strings.Contains(accept, "image/webp") {
		doImage(w, "webp")
	} else if strings.Contains(accept, "image/svg+xml") {
		doImage(w, "svg")
	} else if strings.Contains(accept, "image/jpeg") {
		doImage(w, "jpeg")
	} else {
		http.Error(w, "Unsupported media type", http.StatusUnsupportedMediaType)
	}
}
893643
func (c *InvitesClient) CreateAccept(ctx context.Context, acceptInvite *AcceptInvite) error {
	p := "/invites/accept"

	req, err := c.backend.NewRequest(http.MethodPost, p, nil, acceptInvite)
	if err != nil {
		return err
	}

	_, err = c.backend.Do(ctx, req, nil, func(code int) error {
		return &Error{}
	})
	if err != nil {
		return err
	}

	return nil
}
1297354
func (client *Client) UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (Relationship, Warnings, error) {
	body, err := json.Marshal(Relationship{GUID: isolationSegmentGUID})
	if err != nil {
		return Relationship{}, nil, err
	}

	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.PatchSpaceRelationshipIsolationSegmentRequest,
		URIParams:   internal.Params{"space_guid": spaceGUID},
		Body:        bytes.NewReader(body),
	})
	if err != nil {
		return Relationship{}, nil, err
	}

	var relationship Relationship
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &relationship,
	}

	err = client.connection.Make(request, &response)
	return relationship, response.Warnings, err
}
901694
func (l *LLk) CanAccept(tt lexer.TokenType) bool {
	return l.tkns[0].Type == tt
}
917830
func (client *Client) AllocateInstancePublicConnection(args *AllocateInstancePublicConnectionArgs) (resp *AllocateInstancePublicConnectionResponse, err error) {
	response := AllocateInstancePublicConnectionResponse{}
	err = client.Invoke("AllocateInstancePublicConnection", args, &response)

	if err != nil {
		return nil, err
	}
	return &response, nil
}
1311934
func UserConnectOption(user *url.Userinfo) ConnectOption {
	return func(opts *ConnectOptions) {
		opts.User = user
	}
}