// SetObj Save an object, create if it doesnt exist
540745
func (ep *EtcdClient) SetObj(key string, value interface{}) error {
	keyName := "/contiv.io/obj/" + key

	// JSON format the object
	jsonVal, err := json.Marshal(value)
	if err != nil {
		log.Errorf("Json conversion error. Err %v", err)
		return err
	}

	// Set it via etcd client
	_, err = ep.kapi.Set(context.Background(), keyName, string(jsonVal[:]), nil)
	if err != nil {
		// Retry few times if cluster is unavailable
		if err.Error() == client.ErrClusterUnavailable.Error() {
			for i := 0; i < maxEtcdRetries; i++ {
				_, err = ep.kapi.Set(context.Background(), keyName, string(jsonVal[:]), nil)
				if err == nil {
					break
				}

				// Retry after a delay
				time.Sleep(time.Second)
			}
		}
		if err != nil {
			log.Errorf("Error setting key %s, Err: %v", keyName, err)
			return err
		}
	}

	return nil
}
31919
func (s *ListObjectAttributesInput) SetObjectReference(v *ObjectReference) *ListObjectAttributesInput {
	s.ObjectReference = v
	return s
}
1281872
func (s *BatchUpdateObjectAttributes) SetObjectReference(v *ObjectReference) *BatchUpdateObjectAttributes {
	s.ObjectReference = v
	return s
}
898313
func (s *ObjectAttributeUpdate) SetObjectAttributeKey(v *AttributeKey) *ObjectAttributeUpdate {
	s.ObjectAttributeKey = v
	return s
}
465502
func (l *ossObjects) PutObject(ctx context.Context, bucket, object string, r *minio.PutObjReader, opts minio.ObjectOptions) (objInfo minio.ObjectInfo, err error) {
	data := r.Reader

	return ossPutObject(ctx, l.Client, bucket, object, data, opts.UserDefined)
}
428676
func (t *CookieAuthTransport) setSessionObject() error {
	req, err := t.buildAuthRequest()
	if err != nil {
		return err
	}

	var authClient = &http.Client{
		Timeout: time.Second * 60,
	}
	resp, err := authClient.Do(req)
	if err != nil {
		return err
	}

	t.SessionObject = resp.Cookies()
	return nil
}
876314
func (a *HighlightNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *HighlightNodeArgs {
	a.ObjectID = &objectID
	return a
}
588669
func (s *BatchLookupPolicy) SetObjectReference(v *ObjectReference) *BatchLookupPolicy {
	s.ObjectReference = v
	return s
}
963965
func (s *ListObjectChildrenInput) SetObjectReference(v *ObjectReference) *ListObjectChildrenInput {
	s.ObjectReference = v
	return s
}
782537
func (s *BatchListObjectChildren) SetObjectReference(v *ObjectReference) *BatchListObjectChildren {
	s.ObjectReference = v
	return s
}
221247
func (s *ObjectAttributeUpdate) SetObjectAttributeAction(v *ObjectAttributeAction) *ObjectAttributeUpdate {
	s.ObjectAttributeAction = v
	return s
}
639460
func (s *BatchGetObjectAttributes) SetObjectReference(v *ObjectReference) *BatchGetObjectAttributes {
	s.ObjectReference = v
	return s
}
1291301
func (s *BatchListObjectParents) SetObjectReference(v *ObjectReference) *BatchListObjectParents {
	s.ObjectReference = v
	return s
}
1159483
func (s *RemoveFacetFromObjectInput) SetObjectReference(v *ObjectReference) *RemoveFacetFromObjectInput {
	s.ObjectReference = v
	return s
}
913349
func (s *UpdateFacetInput) SetObjectType(v string) *UpdateFacetInput {
	s.ObjectType = &v
	return s
}
487815
func (s *TaskObject) SetObjects(v map[string]*PipelineObject) *TaskObject {
	s.Objects = v
	return s
}
196088
func (s *S3ContentLocationUpdate) SetObjectVersionUpdate(v string) *S3ContentLocationUpdate {
	s.ObjectVersionUpdate = &v
	return s
}